Skip to content

Instantly share code, notes, and snippets.

@woogists
Last active October 5, 2022 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save woogists/bf1726335d19c807dbafecc594e11d42 to your computer and use it in GitHub Desktop.
Save woogists/bf1726335d19c807dbafecc594e11d42 to your computer and use it in GitHub Desktop.
[Frontend Snippets][Customize the WooCommerce breadcrumb] Remove breadcrumbs for Storefront theme
/**
* Remove breadcrumbs for Storefront theme
*/
add_action( 'init', 'wc_remove_storefront_breadcrumbs');
function wc_remove_storefront_breadcrumbs() {
remove_action( 'storefront_before_content', 'woocommerce_breadcrumb', 10 );
}
@BusinessBloomer
Copy link

This won't work anymore. Please use the following:

add_action( 'init', 'bbloomer_remove_storefront_breadcrumbs');

function bbloomer_remove_storefront_breadcrumbs() {
  remove_action( 'storefront_content_top', 'woocommerce_breadcrumb', 10 );
}

@woogists
Copy link
Author

Thanks, @BusinessBloomer!

Copy link

ghost commented May 9, 2018

As of WP 4.95 / WC 3.3.5 / Storefront 2.3.0 this no longer works, including the @BusinessBloomer fix.

@woogists
Copy link
Author

Hi, @bactofront!

You are correct — use storefront_before_content

Updated!

@Franz333
Copy link

What is wrong with that breadcrumb?

Removing it is ok but as long as we want to remove it on specific pages, it won't work..

Anyone knows how to handle it ?

@jozeflambrecht
Copy link

How can I add the breadcrumbs to the home page? (disabled by default)

@eritAZ
Copy link

eritAZ commented Mar 4, 2022

This appears not to work again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment