By default, WooCommerce displays a breadcrumb when on a product page. This may look off, especially if you are not looking to have your buyers go back to other pages of your store.
WooCommerce breadcrumbs are the first thing you see on the product page. They are a list, path or levels of categories the product is under:
Home > Product Category > Product
How to Remove WooCommerce Breadcrumbs
To remove WooCommerce breadcrumbs, add the code below to your Divi Child theme’s function.php file or via plugin such as Code Snippets.
/**
* Remove the breadcrumbs
*/
add_action( ‘init’, ‘woo_remove_wc_breadcrumbs’ );
function woo_remove_wc_breadcrumbs() {
remove_action( ‘woocommerce_before_main_content’, ‘woocommerce_breadcrumb’, 20, 0 );
}
It is important to note that the custom code must not be added directly to your parent theme’s functions.php file as this will be wiped entirely when you update the theme.
This can also be achieved by using the CSS code below. Ensure that the code is added to the right place within your Divi website.
.woocommerce-breadcrumb {
visibility:hidden;
}
That’s it for now. To be able to receive more of these tips. Subscribe to my newsletter.





0 Comments