Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Don’t show “Home” in breadcrumbs

$
0
0

Replies: 0

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 59525

Trending Articles