Home › Forums › Support › Hiding breadcrumbs on Shop page, but not other shop archives This topic has 7 replies, 2 voices, and was last updated 3 years, 4 months ago by David. Viewing 8 posts - 1 through 8 (of 8 total) Author Posts December 8, 2020 at 5:36 am #1571504 Alexandra Hey guys, Is there a way to hide the breadcrumbs on my shop page but have them on all other product archives? My shop page: https://alex.bandiwork.dev/shop Example of another product archive: https://alex.bandiwork.dev/product-category/produse-imprimate/tote-bags Thank you! December 8, 2020 at 6:33 am #1571557 DavidStaff Customer Support Hi there, try adding this PHP snippet: add_action( 'init', 'woo_remove_wc_breadcrumbs' ); function woo_remove_wc_breadcrumbs() { if (is_shop()) { remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); } } December 9, 2020 at 12:07 am #1572384 Alexandra Hmm, it doesn’t seem to work… I added it but the breadcrumb still shows up on the Shop page ๐ December 9, 2020 at 2:36 am #1572526 DavidStaff Customer Support Hmmm… If you try this: add_action( 'init', 'woo_remove_wc_breadcrumbs' ); function woo_remove_wc_breadcrumbs() { remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); } Does it remove the breadcrumb ? it should remove it from everywhere – just want to check if its the hook or the IF condition thats the problem. December 12, 2020 at 2:36 am #1577161 Alexandra Hi, David! Yes, this did remove the breadcrumb from everywhere. So it seems like it’s the IF condition that’s the problem… December 12, 2020 at 6:52 am #1577476 DavidStaff Customer Support Aah ok, try this: add_action( 'template_redirect', 'woo_remove_wc_breadcrumbs' ); function woo_remove_wc_breadcrumbs() { if (is_shop()) { remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); } } December 13, 2020 at 3:16 am #1578309 Alexandra That’s awesome! Thank you so much, David! ๐ Worked perfectly! December 13, 2020 at 6:19 am #1578454 DavidStaff Customer Support Glad to be of help! Author Posts Viewing 8 posts - 1 through 8 (of 8 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In