...
Tutorials, WooCommerce, Wordpress

How to remove Breadcrumbs from shop page Woo Commerce

22 January 2018

Here we will see How to remove Breadcrumbs from shop page Woo Commerce by custom coding.

Show Breadcrumbs only on Product Page

Put below code in function.php file.

// Remove breadcrumbs from shop & categories
add_filter( 'woocommerce_before_main_content', 'remove_breadcrumbs');
function remove_breadcrumbs() {
	if(!is_product()) {
		remove_action( 'woocommerce_before_main_content','woocommerce_breadcrumb', 20, 0);
	}
}

The above function will remove Breadcrumbs from all places except Product detail page.

Show Breadcrumbs only on Product Page & Categories Page

Put below code in function.php file.

// Remove breadcrumbs only from shop page
add_filter( 'woocommerce_before_main_content', 'remove_breadcrumbs');
function remove_breadcrumbs() {
	if(!is_product() && !is_product_category()) {
		remove_action( 'woocommerce_before_main_content','woocommerce_breadcrumb', 20, 0);
	}
}

The above function will remove Breadcrumbs from all places except Product detail page and Categories.

Leave a Comments