Quantcast
Channel: WordPress.org Forums » [Yoast SEO - Advanced SEO with real-time guidance and built-in AI] Support
Viewing all articles
Browse latest Browse all 42467

Don’t show “Home” in breadcrumbs

$
0
0

Replies: 4

Hi there,

First of all thanks for a great plugin.

I recently implemented your breadcrumbs but I don’t want to show “Home” in the breadcrumb trail. I tried the code below in functions.php but I’m not sure if it’s the one you suggest:

function wpseo_remove_home_breadcrumb($links) { if ( $links[0][‘url’] == home_url(‘/’) ) { array_shift($links); } return $links; } add_filter(‘wpseo_breadcrumb_links’, ‘wpseo_remove_home_breadcrumb’);

After adding the code I got rid of “Home” in the trail as I wanted but now Google Search Console instead for the first time gives me an error. It says: “Either ‘name’ or ‘item.name’ should be specified”, with regards to my homepage.

Do you suggest another method to get rid of “Home” in the breadcrumb trail? Obviously I don’t want a warning in the search console.


Viewing all articles
Browse latest Browse all 42467

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>