Remove WooCommerce Breadcrumbs on Specific Pages

If you are looking for a way to remove breadcrumbs on sites using WooCommerce, you can do it like this:

/**
 * Remove the breadcrumbs
 */
function savvy_remove_shop_breadcrumbs() {
    if (is_shop()) {

        remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20);
    }
}
add_action('init', 'savvy_remove_shop_breadcrumbs');

This code removes breadcrumbs on the main shop page but you can use any other condition for other page types.

Discussion
[  0 Comments  ]

Leave a Comment

To add code, use the buttons below. For instance, click the PHP button to insert PHP code within the shortcode. If you notice any typos, please let us know!