Hi
Is it possible to change the woocommerce breadcrumbs to display Shop instead of Home?
eg. I have a beer website and on the individual product page i have:
Home / Beer / Golden Ale / 24 Carat
I’d like Home to say Shop if possible and go to the shop page.
Does anyone know how to do that?
I tried these snippets:
/**
* Replace the home link URL
*/
add_filter( 'woocommerce_breadcrumb_home_url', 'woo_custom_breadrumb_home_url' );
function woo_custom_breadrumb_home_url() {
return 'https://mybeershop.com/shop';
}
and
/**
* Rename "home" in breadcrumb
*/
add_filter( 'woocommerce_breadcrumb_defaults', 'wcc_change_breadcrumb_home_text' );
function wcc_change_breadcrumb_home_text( $defaults ) {
// Change the breadcrumb home text from 'Home' to 'Apartment'
$defaults['home'] = 'Shop';
return $defaults;
}
Which sort of does the job, but on the shop page it now says Shop / Shop.
Probably asking it to do too much so might have to live with Home being in the breadcrumbs and it going to the Home page.
Has anyone ever fixed this issue? Thanks.