Snippets: Remove the Yoast Breadcrumbs title

Yoast doesn't have a setting to remove the title from the end of the breadcrumbs but you can use their "wpseo_breadcrumb_single_link" filter to remove it.

add_filter('wpseo_breadcrumb_single_link', function( $link_output) {
	if( strpos( $link_output, 'breadcrumb_last' ) !== false ) {
		$link_output = '';
	}
   	return $link_output;
} );

Snippet Type: PHP

Posted Under: SEO

All PHP snippets should be added via a child theme's functions.php file.