Support » Plugin: Breadcrumb » Remove WooCommerce breadcrumb from ONE page (shop)

  • Hi,

    I’m trying to remove the breadcrumbs from just the ‘shop’ page on my website. I’ve seen solutions for removing this from the home page but my shop isn’t on the home page. I have changed the ‘home’ link to ‘shop’ so customers can navigate back to the shop when viewing a product.

    I have tried:

    add_action('template_redirect', 'remove_shop_breadcrumbs' );
    function remove_shop_breadcrumbs(){
    
    	if (is_page('Shop')) {
    		remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0);
    	}
    
    }

    But no joy. This is almost the same code people are using to remove breadcrumbs from the home page so I’m not sure what I’m doing wrong here.

    Any insight would be great!

    Website: http://vanquish-ips.com/shop/

    https://wordpress.org/plugins/breadcrumb/

Viewing 1 replies (of 1 total)
  • I had to change the action to load in wp_head for it to hide the breadcrumbs for my theme. Here’s my code:

    function remove_woocommerce_breadcrumbs() {
    	if (is_shop()) {
    		remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
    	}
    }
    
    add_action( 'wp_head', 'remove_woocommerce_breadcrumbs' );
Viewing 1 replies (of 1 total)
  • The topic ‘Remove WooCommerce breadcrumb from ONE page (shop)’ is closed to new replies.