The Solution:
Go to the functions.php file in your theme’s folder (i.e. /wp-content/themes/your-theme/functions.php) and add the following code before the end of the file and before the ?> (if it exists):
[crayon lang=”php”]remove_action( ‘woocommerce_before_main_content’,’woocommerce_breadcrumb’, 20, 0);[/crayon]
The Explanation:
WooCommerce is a fantastic ecommerce solution; but recently, while working on this very website, we found the need to remove the breadcrumbs from the WooCommerce built-in function.
[crayon lang=”php”]<?php do_action(‘woocommerce_before_main_content’); ?>[/crayon]
Breadcrumbs in WooCommerce look like this:
Suman Banerjee
Feb 13, 2014 -
Thanks. It worked!
loic
Mar 2, 2014 -
Thank you for the tip!
Ecommerce Solutions
Apr 1, 2014 -
First of all Thanks for share…..your blog is really nice and awesome also.i like it so much
eyeBoogies
Apr 3, 2014 -
Thanks, worked like a lucky charm!
Kiryl
Apr 30, 2014 -
It didn’t work ( Any ideas why?
theadmin
Apr 30, 2014 -
You would need to give us a little more information. Did you receive an error message? Did you encapsulate it with ?
nunhes
Nov 12, 2014 -
Great! Thanks
Mario Bruneau
Dec 9, 2014 -
Worked! thanks
Sandra
Jan 8, 2015 -
Great! Thanks a lot.
RAGING
Jan 28, 2015 -
Totally bricked my site. I removed the edited code but It still zonked. Here is what I see now:
Warning: require(/home/bitckdbr/public_html/wp-includes/load.php): failed to open stream: No such file or directory in /home/bitckdbr/public_html/wp-settings.php on line 21
Fatal error: require(): Failed opening required ‘/home/bitckdbr/public_html/wp-includes/load.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/bitckdbr/public_html/wp-settings.php on line 21
theadmin
Feb 6, 2015 -
This is because of another error.
Carlton
Mar 14, 2015 -
Worked like a charm! Thanks!
Kjetil
Mar 29, 2015 -
I did this, and my website crashed completely. :-/
theadmin
Mar 31, 2015 -
Definitely shouldn’t have. What was the error?
Robin Jennings
Jun 16, 2015 -
That worked a treat. Many thanks.
Henry Caballero
Jan 21, 2018 -
Using the php code for storefront didn’t work and so I tried to use CSS.
/** woocommerce breadcrumb display **/
.woocommerce-breadcrumb {
display: none;
}
/** woocommerce breadcrumb display end **/
Stuart Holden
Feb 22, 2018 -
Thanks Henry – this worked for me too.
Jana
Feb 4, 2018 -
Fixed my problem. Thank you!
Martin
Feb 27, 2018 -
This can be confusing if you are unfamiliar with how WP and Woocommerce hangs together. I spent many hours trying to figure out the simplest of changes. Rather than updating the functions.php which will either be in your theme or ideally your child theme’s directory use the CSS method instead. Simply click on ‘Appearance’ then ‘Customize’, scroll down to ‘Additional CSS’ and paste this is in.
/** woocommerce hide breadcrumb display **/
.woocommerce-breadcrumb {
display: none;
}
/** woocommerce breadcrumb display end **/
This is a global change.
Jeff
Feb 27, 2018 -
Hi Martin,
Will this remove or simply hide the breadcrumb display? On one of the forums it was stated that if you didn’t need them, the site would perform faster if they were removed altogtether instead of just being hidden. Just curious what your thoughts are?
Also, when I click on the Additional CSS tab, I see a line of code there already. It’s labeled 1. and then the code. I can’t find an option to enter line 2. Or do I simply add it in with the code in box 1. ? Thanks
TJ Nelson
Mar 30, 2018 -
The question I have is – how do I ADD breadcrumbs to wordpress?
Ian Ericson
Jun 5, 2018 -
Although there are two ways to remove the breadcrumbs the row of white space where the breadcrumb trail was is still there. How can people remove both the breadcrumb and the space for the breadcrumb so the remaining page elements move up to the bottom of the main navigation menu?
Cyndy
Jul 11, 2018 -
Thank you, Martin! The CSS method worked and with your step-by-step directions, it was super easy.
Raphaël
Aug 10, 2018 -
Very good ! Thanks a lot.
Websolus
Aug 10, 2018 -
Thanks a lot