Notice: There is no legacy documentation available for this item, so you are seeing the current documentation.
Purpose
This filter can be used to change the separator, including HTML, used between breadcrumbs.
Arguments (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;
}