Community Forums › Forums › Archived Forums › Design Tips and Tricks › [Executive Pro] How to Remove WooCommerce Breadcrumbs
Tagged: breadcrumbs, executive pro, WooCommerce
- This topic has 4 replies, 3 voices, and was last updated 8 years, 2 months ago by
amitramani.
-
AuthorPosts
-
September 22, 2017 at 10:34 am #211754
amitramani
MemberI have a perplexing query about removing WooCommerce Breadcrumbs. It should be easily removed by the following code:
add_action( 'init', 'jk_remove_wc_breadcrumbs' ); function jk_remove_wc_breadcrumbs() { remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); }However, it does not remove the WooCommerce breadcrumbs.
I have also tried the following code as well, with no changes:
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );Any ideas why it is not working?
https://www.tacknrider.com/product-category/leg-hoof-care/September 22, 2017 at 11:04 am #211756Erika
ParticipantHi Amitramani,
Add this code in your style.css file:
.woocommerce .woocommerce-breadcrumb {
display: none;
}or
.woocommerce .woocommerce-breadcrumb {
display: none !important;
}This should fix your issue 🙂
September 22, 2017 at 2:20 pm #211764amitramani
MemberHi Erika
Thank you for the suggestion, but I was looking for a PHP solution (not to hide it via CSS).
Sorry I should have clarified that in my original post.I'd think somebody has to have disabled WooCommerce Breadcrumbs on Genesis-based themes!
September 23, 2017 at 6:17 am #211786Victor Font
ModeratorGoogle does not like hidden content on pages. I know using CSS to display: none is a popular solution, but it will have a negative impact on a site's SEO and should only be used if there's no other choice.
Genesis Connect for WooCommerce already removes the woocommerce_breadcrumb action, which means that on your site, the breadcrumbs are enabled through code or in a custom template after the Genesis Connect templates are loaded. Your theme, Executive Pro, is one of the themes updated recently to support WooCommerce, but it works in harmony with Genesis Connect. Do you have custom templates where woocommerce_breadcrumb action may be re-enabled?
You also have a few WooCommerce helper plugins. Any one of these may be enabling the breadcrumbs. Whatever the case, you have something on your site overriding what Genesis is doing. You're going to have to dig through code, disable plugins, etc., to find out how the breadcrumbs are being enabled.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?September 23, 2017 at 9:15 am #211795amitramani
MemberI found the issue. It was a mistake I made in uncommenting the following line
That was causing the WooCommerce breadcrumbs being invoked from within the Genesis Connect for WooCommerce plugin.
Thanks for all your help!
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.