Affirm Banner | Q2 2024

added by Latoya

Flash sale: Get up to 30% off themes and extensions. Ends April 26 at 3 pm UTC. Shop the sale.
Product Icon

WooCommerce Brands

Create, assign and list brands for products, and allow customers to view by brand.

Make Brands breadcrumbs into links

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.

Author

Current Status

Open

Last updated: October 22, 2018

3 comments

Log in to comment on this feature request.

  1. Elis Moer says:

    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/

  2. Anonymous says:

    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 );

  3. Sillo says:

    ‘@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 );