Skip to content

Instantly share code, notes, and snippets.

@mommaroodles
Created December 9, 2024 15:24
Show Gist options
  • Save mommaroodles/0ea104d305c25e5170ef5f68a7139d54 to your computer and use it in GitHub Desktop.
Save mommaroodles/0ea104d305c25e5170ef5f68a7139d54 to your computer and use it in GitHub Desktop.
Remove Woocommerce breadcrumbs
add_filter( 'woocommerce_get_breadcrumb', 'remove_shop_crumb', 20, 2 );
function remove_shop_crumb( $crumbs, $breadcrumb ){
foreach( $crumbs as $key => $crumb ){
if( $crumb[0] === __('Shop', 'Woocommerce') ) {
unset($crumbs[$key]);
}
}
return $crumbs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment