fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Removing one attribute from archive pages

Luke Boobyer

I have two attributes for products that show swatches, Color and Size. Is there anyway to hide one of these on the product archive/category pages?

The divs don’t have a unique class specific to that attribute so there doesn’t seem to be a clean way with CSS to hide them, is there a php snippet I could add to the functions.php?

Currently I am just using:

.archive .product .variations .woo-variation-items-wrapper:nth-of-type(2n) {
display: none;
}

Hakik Zaman

Hello Luke Boobyer,

Thanks for reaching to us. Could you please follow this documentation to do that. We have a feature to do that.

Please let me know, is it resolved your issue or not. Looking forward to hearing from you soon.

Thanks

Luke Boobyer

Thanks that’s useful to know.

I have set that up as per the documentation, it works if i select size as the attribute to show, but not colour which is the one I need.

If I select my colour attribute it show as the single attribute on archive pages then it shows no attributes.

Luke Boobyer

Ah ok so I also have to set it on a per product basis under Catalog mode attribute otherwise it doesn’t show anything.

Hakik Zaman

Hello Luke,

Yes, you can set one attribute globally. But if you want another attribute for some products then you can set them in single product edit page (in Swatches Settings section).

Thanks

Luke Boobyer

I currently have colour set as the global attribute to show, but this doesn’t work and it shows nothing. It only appears and works if I set each product to use colour as the attribute under Catalog mode attribute.

Hakik Zaman

Hello Luke Boobyer,

I currently have colour set as the global attribute to show, but this doesn’t work and it shows nothing. It only appears and works if I set each product to use colour as the attribute under Catalog mode attribute.

Make sure you are not using Custom Product Level attribute. To make them workable you have to use Global Attributes.

Want to know more about Custom/Global Attribute? Please check this.

Thanks

Luke Boobyer

Great that makes sense. They are all custom product attributes which they need to be. I’ll just set that option per product.

Thanks for your help thats solved it.