Site logo

Archived topic

Change Home to Shop in Woocommerce Breadcrumbs

3 replies · Started by DAVID on October 20, 2020

Viewing posts 1–4 of 4

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.

Hi there,

I can't recall seeing a similar mention of this unfortunately.

That is a WooCommerce filter so I would recommend checking with their support team or a general WordPress forum like this:
https://wordpress.stackexchange.com/

Ok, thanks Leo.

No problem :)

This archived topic is closed to new replies.