aioseo_breadcrumbs_separator

Purpose

This filter can be used to change the separator, including HTML, used between breadcrumbs.

Arguments (1)

  1. $separator (string) – The separator html.

Example code snippet

The code snippet below is just an example of how this filter can be used. In the example below we’ll change the separator html on pages.

// Change separator on pages.
add_filter( 'aioseo_breadcrumbs_separator', 'aioseo_breadcrumbs_separator' );
function aioseo_breadcrumbs_separator( $separator ) {
	if ( is_singular( 'page' ) ) {
		$separator = '<span class="my-separator">-></span>';
	}

	return $separator;
}