Product taxonomy does not look like a product category page

This is the setup I have so far:

  • I have a WooCommerce site with products. I created a custom taxonomy called ‘Brands’ for the products.

  • Products are sorted into categories (like Shapewear, Hosiery etc) and Brands.

The problem:

Please note:

  • I have already removed all my own custom code to make sure that I did not accidentally cause this, but this did not fix the problem.

  • When I inspected the elements on these two pages I found that for some reason the UL element on the product category page has class=“products cols-3”, but the same element on the Brands custom taxonomy page only has class=“products” and this appears to make all the difference.

Why is this happening, and how can I fix it?

Hi @designbytrick

Thanks for reaching out.
It seems that the taxonomy page is coming from a custom taxonomy, to modify the specific taxonomy page please find the details in this article: https://developer.wordpress.org/themes/basics/template-hierarchy/#custom-taxonomies
Alternatively, you can try by adding the following custom JavaScript code into the Theme Options > JS.

jQuery(document).ready(function($)
{
    if(!jQuery('ul.products').hasClass('cols-3'))
    {
        jQuery('ul.products').addClass('cols-3');
    }
});

Remember that the above code will work if copied as it is and don’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We do not provide support for custom codes that means we can’t fix it in case it conflicts with something on your site nor will we enhance it.

Thanks

Thank you so much! That is all I needed.

Hi @designbytrick,

Glad that we are able to help you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.