Storefront woocommerce breadcrumb : remove action not working with conditionals
-
Hello guys,
I have been searching for a long time to find the way to remove the breadcrumb (storefront theme).
This code works well :
function wc_remove_storefront_breadcrumbs() { remove_action( 'storefront_before_content', 'woocommerce_breadcrumb', 10 ); } add_action( 'init', 'wc_remove_storefront_breadcrumbs');
But as soon as you want to remove the breadcrumb on certain pages only, it does not work.
function wc_remove_storefront_breadcrumbs() { if ( is_page (44) ) { remove_action( 'storefront_before_content', 'woocommerce_breadcrumb', 10 ); } } add_action( 'init', 'wc_remove_storefront_breadcrumbs');
Is there a bug somewhere or is it just better to remove it completely and use yoast?
Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Storefront woocommerce breadcrumb : remove action not working with conditionals’ is closed to new replies.