WooCommerce Brands: Display Brands @ Shop & Category Pages

A freelance client hired me to display each product brand in the shop/product archive pages. The WooCommerce Brands plugin, in fact, only adds these in the Single Product Page.

So, this is how it’s done. Enjoy!

Display WooCommerce Brands @ Loop/Shop Pages

PHP Snippet: Display “Brands” @ WooCommerce Shop & Product Archives – WooCommerce Brands Plugin

/**
 * @snippet       Display "Brands" @ Shop/Loop - WooCommerce
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 5
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */

add_action( 'woocommerce_after_shop_loop_item_title', 'bbloomer_show_woocommerce_brands_loop', 8 );

function bbloomer_show_woocommerce_brands_loop() {
	global $post;
	echo get_brands( $post->ID );
}

Where to add this snippet?

You can place PHP snippets at the bottom of your child theme functions.php file (delete "?>" if you have it there). CSS, on the other hand, goes in your child theme style.css file. Make sure you know what you are doing when editing such files - if you need more guidance, please take a look at my free video tutorial "Where to Place WooCommerce Customization?"

Does this snippet (still) work?

Please let me know in the comments if everything worked as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting on PHP 7.3.

If you think this code saved you time & money, feel free to join 14,000+ WooCommerce Weekly subscribers for blog post updates or 250+ Business Bloomer supporters for 365 days of WooCommerce benefits. Thank you in advance :)

Need Help with WooCommerce?

Check out these free video tutorials. You can learn how to customize WooCommerce without unnecessary plugins, how to properly configure the WooCommerce plugin settings and even how to master WooCommerce troubleshooting in case of a bug!

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza.

42 thoughts on “WooCommerce Brands: Display Brands @ Shop & Category Pages

  1. Hi,

    It does not work for me. I am using Kadence Shop Kit to showing for my brands.
    And when add this code it will be some trouble in my store and wordpress want me to trouble shooting.

    Can this be the Kadence Shop Kit Plugin that the code does not work with? Thanks!

    1. Not sure. If you disable Kadence and enable WooCommerce Brands, does it work?

  2. It still works! Also adjusted it myself to make it above the product title which is awesome. But how do you remove the link to the brand or just link to the product versus the brand page? I know custom code. Reaching out for quote.

    1. Cool! To remove the link, you need a workaround with remove_action as the whole block of content is wrapped into a link. Thanks for reaching out

  3. Hi Rodolfo,

    Is it possible to show brand thumbnail on the top side corner of the products in the shop page? The brand thumbnail (logo) will be stacked on top of the product thumbnail. Is it doable with this plugin or doable at all? Appreciate your advise!

    Thank you!

    1. Hi Jimmy thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  4. Hi!
    Is it possible to have it over the product title?

  5. Hello,
    Thank you for your help. It works perfectly. Is it possible to display only the “parent” brand ?

    1. Hi Karim, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  6. Hey
    How to set logo image above title in product page?

    1. Hi Bar, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  7. Thanks! works great, is there a way to make it:

    Image
    Brand
    Title
    Price

    Currently Brand is after the title.

    1. Ivan, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  8. Hi, it doesn’t work, it gets a reply while uploading the code:

    Uncaught Error: Call to undefined function get_brands() in wp-content/themes/astra/functions.php:168
    Stack trace:
    #0 wp-includes/class-wp-hook.php(287): bbloomer_show_woocommerce_brands_loop(”)
    #1 wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
    #2 wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 wp-content/plugins/woocommerce/templates/content-product.php(57): do_action(‘woocommerce_aft…’)
    #4 wp-includes/template.php(732): require(‘/home/sinkevic/…’)
    #5 wp-content/plugins/woocommerce/includes/wc-core-functions.php(283): load_template(‘/home/sinkevic/…’, false)
    #6 wp-conte

    1. What Brands plugin are you on?

  9. Brilliant, thank you! Just added it to my store and it still works.

    1. Yay!

  10. Dear Rodolfo,
    thank you for this snippet, it is really helpful. Somehow the brand name appears below all the other information (price, price per liter, shipping …), just above the buy-button. Is there an easy way to make it appear right below the product name? Thank you.
    David

    1. Hi David, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  11. You can put the brand image instead of the title, in the same place with some code

    1. Cool. Share it here maybe?

  12. Hello,

    Your code doesn’t work at all, I bought The WooCommerce Brands plugin because of your article, so I activate the plugin, add your code in the child theme function.php but nothing happen. Can you try to help me ? I will be very thankful !

    I’m using :

    WordPress : 5.2.3
    Elementor Pro : 2.6.5
    WooCommerce : 3.7.0

    1. Do you get any PHP error?

  13. Hello,

    Unfortunately this code doesn’t work with my site. It says: the site is experiencing technical difficulties.
    I also tried with twenty seventeen theme (no error but no brands showing). Any ideas ?

    I am using:

    Theme: xstore
    Wordpress: 5.2.2
    Woocommerce: 3.6.4
    Php: 7.1

    1. Hi there, what error do you get exactly? Please copy/paste here the part of the WordPress email notification where it describes the issue. Thank you!

    2. Here is the picture. The page width got shorten and there is only one product showing.

      Error log:

      Fatal error: Uncaught Error: Call to undefined function get_brands() in ...

      https://shrani.si/f/1b/3l/98C8i5T/11.png

      1. Hi there, are you using the official WooCommerce Brands plugin?

  14. Hey! Still working & amazing – thank you! One question – what do I need to add to the code to be able to style the brand name? I was hoping to reference it and add the CSS to the live editor ๐Ÿ™‚ Thank you!

    1. Hello Sarah! Just add an HTML class to the PHP and then reference it in your CSS:

      echo '<div class="loop-brands">' . get_brands( $post->ID ) . '</div>';
      
  15. Hi Rodolfo, thank you very much for this code. Would it be possible to link the brand title to the actual product instead of the brand archive? Thank you again!

    1. Hello Rika, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  16. hello sir,
    I’m using perfect woocommerce brands plugin to display my brands . when somebody click on brand logo i just need the category of that brand to be displayed am new to wordpress please help me

    1. Hey Anjana, thanks for your comment! Try ask the plugin developers please ๐Ÿ™‚

  17. Hi Rodolfo, Many thanks for sharing with us these code snippets.
    It has really helped me out a lot. Your site is officially my “go-to” site for everything woocommerce.
    I need some help here. I have browsed through lots of materials, I’ve not gotten any solution.

    I want to show my custom taxonomies on the shop page, just like the way you’ve shown brands above.
    Please, how do I go about it.
    I have no experience in coding, please.

    Many thanks, standing by.

    1. Hello Prince – thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding! ~R

  18. Still works.
    Many Thanks ๐Ÿ™‚

    Best
    David

    1. Thank you David ๐Ÿ™‚

  19. Hi Rodolfo – is there an elegant way to hide the entire brand loop if there is no brand assigned?

    We have a few products that are gift packs and contain items from a few different makers, so we generally leave the name blank. However I noticed it has been throwing errors in the error_log when these products are listed in the category loop (I think).

    1. Hey Justin, thanks for your comment! Yes, you can just check if “get_brands” exists before echoing it. Hope this helps ๐Ÿ™‚

  20. Thanks!! Just what I needed. I find myself landing on your site more and more these days. Really appreciate your work!

    1. Thank you so much Justin ๐Ÿ™‚

Questions? Feedback? Support? Leave your Comment Now!
_____

If you are writing code, please wrap it between shortcodes: [php]code_here[/php]. Failure to complying with this (as well as going off topic, not writing in English, etc.) will result in comment deletion. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining BloomerArmada to get blog comment reply priority, ask me 1-to-1 WooCommerce questions and enjoy many more perks. Thank you :)

Your email address will not be published.