@lcf I see what you mean….
Well, it’s either that or being left with a separator at the end of your breadcrumb…
If you’d rather have the latter, you can use this in your functions.php file:
function adjust_single_breadcrumb( $link_output, $link ) {
if( isset( $link['id'] ) && strpos( $link_output, 'breadcrumb_last' ) !== false ) {
$link_output = '';
}
return $link_output;
}
add_filter('wpseo_breadcrumb_single_link', 'adjust_single_breadcrumb', 10, 2 );
I’ll be sending a pull request to @yoast to sort this out once and for all in a future version.
Once that’s been accepted & released, you’ll be able to use this snippet:
function adjust_single_breadcrumb( $link_output, $link ) {
if( isset( $link['id'] ) && strpos( $link_output, 'breadcrumb_last' ) !== false ) {
$link_output = '';
}
return $link_output;
}
add_filter('wpseo_breadcrumb_single_link_with_sep', 'adjust_single_breadcrumb', 10, 2 );
If you like, you can just add this last snippet to your functions.php file and once my change has been included in the plugin and you’ve upgraded, it will automatically work for you.
Hope this helps.
Smile,
Juliette