Home Remove breadcrumbs from Storefront theme in Woocommerce 3.3
Reply: 0

Remove breadcrumbs from Storefront theme in Woocommerce 3.3

user1793
1#
user1793 Published in May 27, 2018, 3:38 am

Up until a recent update (for Woocommerce, and also the Storefront theme), I was able to remove breadcrumbs using the following code in the child theme functions.php

add_action( 'init', 'z_remove_storefront_breadcrumb' );
function z_remove_storefront_breadcrumb() {
remove_action( 'storefront_content_top', 'woocommerce_breadcrumb',  10 );

That solution is described here.

Since the update (and I am not sure if it was the WC or SF update that did it) this no longer works.

I also tried the other method suggested in the above-mentioned post. And a few other methods, all listed here:

add_filter( ‘woocommerce_get_breadcrumb’, ‘__return_false’ );
remove_action( 'woocommerce_before_main_content','woocommerce_breadcrumb', 20, 0);

and

add_action( 'init', 'jk_remove_storefront_breadcrumb' );
function jk_remove_storefront_breadcrumb() {
remove_action( 'storefront_content_top', 'woocommerce_breadcrumb',  10 );
}

also

add_action( 'init', 'woo_remove_wc_breadcrumbs' );
function woo_remove_wc_breadcrumbs() {
    remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
}

also

add_filter( ‘woocommerce_get_breadcrumb’, ‘__return_false’ );
remove_action( 'woocommerce_before_main_content','woocommerce_breadcrumb', 20, 0);

also

add_filter( 'woocommerce_before_main_content', 'remove_breadcrumbs');
function remove_breadcrumbs() {
        remove_action( 'woocommerce_before_main_content','woocommerce_breadcrumb', 20, 0);
}

Can anyone suggest what the current way to remove breadcrumbs from the Storefront theme is?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.378792 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO