Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi karsen

    Give a try with following:

    add_action(‘template_redirect’, ‘remove_page_breadcrumbs’ );
    function remove_page_breadcrumbs(){
    if (is_page(‘YOUR_PAGE_ID_OR_SLUG’))
    remove_action( ‘woocommerce_before_main_content’, ‘woocommerce_breadcrumb’, 20, 0);
    }

    You can also hide that breadcrumbs using Super Simple Custom CSS plugin

    1) Install this plugin
    2) Edit shop page and add this css in “super simple custom css” plugin section

    section#title {
        display: none;
    }
    Thread Starter karsen

    (@karsen)

    @desraj no it doesn’t solve the problem. still its showing “blog archives” in shop page

    Thread Starter karsen

    (@karsen)

    @anandp910 no it doesn’t solve. Any other code.

    @karsen i think this will work

    Edit shop page and go to “super simple custom css” section and add this css

    section#title {
        display: none !important;
    }
    Thread Starter karsen

    (@karsen)

    @anandp910 No bro…still same problem… have a look at this…
    https://www.ocellisystems.com/shop/

    Thread Starter karsen

    (@karsen)

    This code is worked
    Thank you guys

    .woocommerce-page section#title {
      display: none;
    }

    Removing breadcrumbs with CSS is not right solution, cause it still on the page (but hidden) and takes some time on page loading.

    Find functions.php in your active theme folder and add this code at the end of the 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);
    	}
    }

    Using WooCommerce Conditional Tags we can build own logic. For example, code above is removing breadcrumbs on shop and categories pages, but leave it on the single product page.

    You can remove breadcrumbs on shop page, but leave it on categories:

    // 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);
    	}
    }

    That’s all ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to remove Breadcrumbs from shop page ?’ is closed to new replies.