Hiding woo breadcrumbs on specific page
-
Hey! So I do want to hide the breadcrumbs on the productpage that I drive traffic to.
I found this code that technically looks as if it should work:
add_action('template_redirect', 'remove_page_breadcrumbs' ); function remove_page_breadcrumbs(){ if (is_page('YOUR_PAGE_ID_OR_SLUG')) remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0); }
But somehow it changes nothing when I add a product page ID to test it. I can only assume that some of the WooCommerce classes are wrong?
With kind regards
Chris
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Hiding woo breadcrumbs on specific page’ is closed to new replies.