-
-
Save amboutwe/4b7a2f01366399281a53c355c5b78801 to your computer and use it in GitHub Desktop.
Hi,
I am using the following code ,to remove "Shop" from breadcrumb in Schema.org but does not work. Any suggestions? Thank you beforehand.
add_filter( 'wpseo_breadcrumb_single_link' ,'wpseo_remove_breadcrumb_link', 10 ,2);
function wpseo_remove_breadcrumb_link( $link_output , $link ){
$text_to_remove = 'Shop';
if( $link['text'] == $text_to_remove ) {
$link_output = '';
}
return $link_output;
}
@foteinitaramonli These snippets are examples of how you can modify the Yoast SEO breadcrumb visual output (image below). These snippets will not alter the breadcrumb schema output nor will they alter WooCommerce's breadcrumb visual output.
Please consult the Yoast SEO schema documentation to change the breadcrumb schema. Please consult the WooCommerce breadcrumb documentation to change WooCommerce's breadcrumb output.
Hello,
thank you very much for these snippets.
But "$text_to_remove" does not work for text with an "&" in it.
I tried it with (all without blanks, of course):
- &
- & amp ;
- & #x26 ;
- & #38 ;
I don't want to show Home on homepage how to disable that ?
@Saad876 This is not the proper place to request support. Please check out our extensive help section or visit the free support forum. If you require further support, upgrading to our premium version provides you with access to our support team.
This is not the proper place to request support. Please check out our extensive help section or visit the free support forum. If you require further support, upgrading to our premium version provides you with access to our support team.