[Resolved] Change Home to Shop in Woocommerce Breadcrumbs

Home Forums Support [Resolved] Change Home to Shop in Woocommerce Breadcrumbs

Home Forums Support Change Home to Shop in Woocommerce Breadcrumbs

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1497235
    DAVID

    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.

    #1497256
    Leo
    Staff
    Customer Support

    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/

    #1497334
    DAVID

    Ok, thanks Leo.

    #1497343
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.