Want to know what WordPress Theme a site is using? Check Out Now!

How to Remove WooCommerce Breadcrumbs in WordPress?

Do you want to remove WooCommerce breadcrumbs on some or all pages?

There are multiple scenarios when you want to restrict users from visiting parent pages. With breadcrumbs, they can access parent page links.

Below are a set of code snippets that allows you to remove code snippets from your WooCommerce site on one page, specific pages, a specific theme, or all pages.


How To Remove WooCommerce Breadcrumbs on All Pages in WordPress?

/**
 * Remove the WooCommerce breadcrumbs in WordPress 
 */
 add_action( 'init', 'maverick_remove_woocommerce_breadcrumbs' );
 function maverick_remove_woocommerce_breadcrumbs() {
     remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
 }

How To Disable WooCommerce Breadcrumbs on Shop Page in WordPress?

/**
 * Remove the WooCommerce breadcrumbs From Shop Page in WordPress
 */
add_action('init', 'maverick_remove_woocommerce_breadcrumbs');
function maverick_remove_woocommerce_breadcrumbs()
{
    if (is_shop()) {
        remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0);
    }
}

How To Remove WooCommerce Breadcrumbs on Cart Page in WordPress?

/**
 * Remove the WooCommerce breadcrumbs From Cart Page in WordPress
 */
add_action('init', 'maverick_remove_woocommerce_breadcrumbs');
function maverick_remove_woocommerce_breadcrumbs()
{
    if (is_cart()) {
        remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0);
    }
}

How To Remove WooCommerce Breadcrumbs on Checkout Page in WordPress?

/**
 * Remove the WooCommerce breadcrumbs From Checkout Page
 */
add_action('init', 'maverick_remove_woocommerce_breadcrumbs');
function maverick_remove_woocommerce_breadcrumbs()
{
    if (is_checkout()) {
        remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0);
    }
}

How To Remove WooCommerce Breadcrumbs When Using Woo theme in WordPress?

If you want to remove the breadcrumbs in Woo-developed themes site-wide and not only on WooCommerce pages, you can use the below code snippet.

/**
 * Remove breadcrumbs in Woo developed themes
 */
add_action( 'init', 'maverick_remove_breadcrumbs_woo_theme' );
function maverick_remove_breadcrumbs_woo_theme() {
    remove_action( 'woo_main_before', 'woo_display_breadcrumbs', 10 );
}

If you want to remove breadcrumbs on WooCommerce pages when using a Woo theme, you need to use the below code snippet.

/**
 * Remove breadcrumbs on specific pages in Woo Developed Themes
 */
add_action( 'init', 'maverick_remove_breadcrumbs_woo_theme' );
function maverick_remove_breadcrumbs_woo_theme() {
    if ( is_woocommerce() || is_cart() || is_checkout() ) {
        remove_action( 'woo_main_before', 'woo_display_breadcrumbs', 10 );
    }
}

How To Remove WooCommerce Breadcrumbs When Using Storefront WordPress theme?

/**
 * Remove breadcrumbs for Storefront theme
 */
add_action( 'init', 'maverick_remove_breadcrumbs_storefront_theme');

function maverick_remove_breadcrumbs_storefront_theme() {
  remove_action( 'storefront_before_content', 'woocommerce_breadcrumb', 10 );
}

Leave a Reply

Your email address will not be published. Required fields are marked *