Remove Post Title From Yoast SEO Plugin Breadcrumb

How to Remove Post Title From Yoast SEO Plugin Breadcrumb

WordPress SEO by Yoast is undoubtedly powerful seo plugin for wordpress websites and it has many built in features such as XML sitemaps, Breadcrumb navigation, file editor and still more. But Yoast Breadcrumb navigation does not have enough features and options to control them which results breadcrumb navigation looks ugly (in my perspective) and it shows duplicate post title trailing with breadcrumb navigation.

There is a post title already there in native wordpress themes and again showing the same variable with Yoast breadcrumb navigation not quite good. Sometimes, if the post title gets longer, it wraps down to second line and looks fishy. When i search for the solution via google, unfortunately there is no solution which works successfully. So, i did request my friend Mr.Kannan (CEO of corel web designs) to find the solution for this issue. After some in-depth analysis (2 hours+) he added a new function to get rid of post title trailing with breadcrumb navigation without hacking the original WordPress SEO plugin core files. It works!

Here i am sharing the code with you who is interested to get rid of post title trailing from the Yoast SEO plugin breadcrumb navigation. Simply add the below code in your functions.php file (probably in your wordpress child theme) and make the necessary changes in your single.php as well.

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

If you found any difficulties to apply this technique, post your comment below using the comment form. Your valuable suggestions are always welcome.


Leave a Comment