Currently there are breadcrumbs available when viewing Brands, but you can’t navigate back to a general archive of brands, nor view ALL of a brands products from the breadcrumbs. Those breadcrumbs should be links back to their appropriate pages.
Open
Last updated: October 22, 2018
Log in to comment on this feature request.
I agree. This seems like an atypical factor to even have as a “feature request”. We must preserve in mind this isn’t a loose plugin in any respect, so retaining existing links ought to be a given. You can see more detail here https://tacticoolammoshop.com/product-category/rifle-ammo/30-06-ammo/
Great fix. You caught me with the ‘Hello ‘ .
function wc_custom_brands_breadcrumb( $crumbs, $breadcrumb ){
// The ID for the page that you want to act as the brands top archive
$page_url = get_the_permalink(69);
foreach( $crumbs as $key => $crumb ){
if( $crumb[0] === __(‘Brands’) ) {
$crumbs[$key][1] = $page_url;
}
}
return $crumbs;
}
add_filter( ‘woocommerce_get_breadcrumb’, ‘wc_custom_brands_breadcrumb’, 20, 2 );
‘@Ryan here’s a quickfix you can use until they fix it 🙂
function wc_custom_brands_breadcrumb( $crumbs, $breadcrumb ){
// The ID for the page that you want to act as the brands top archive
$page_url = get_the_permalink(69);
foreach( $crumbs as $key => $crumb ){
if( $crumb[0] === __(‘Brands’) ) {
$crumbs[$key][1] = ‘Hello ‘. $page_url;
}
}
return $crumbs;
}
add_filter( ‘woocommerce_get_breadcrumb’, ‘wc_custom_brands_breadcrumb’, 20, 2 );