Woocommerce Make Attribute Page Display Same As Product Archive Page

Hi,

I would like to have my Woocommerce archive pages all display in the same layout.

Currently the layout I want to see is: https://shootingsuppliesltd.co.uk/product-category/rifle/

I would like to see the same layout across all archives: https://shootingsuppliesltd.co.uk/brand/fab-defense/

Could you please advise how to achieve this?

Thanks,

Hi @daz1uk,

Thank you for writing in, please navigate to Theme Options > Layout and Design and set the Content Layout to Sidebar Left, Content Right


Hope it helps,
Cheers!

Hi,

Unfortunately this is already set as the default for my site, I was surprised to find that the layout for the attribute archive was not the same as other woocommerce archive pages and am not sure why this would be the case?

Thanks,

Hello @daz1uk,

Please go to X > Theme Options > WooCommerce > Shop and set the Shop Layout to “Use Global Content Layout”. This will make sure that other archive pages will use the global layout.

Hope this helps. Please let us know how it goes.

Hi,

No, unfortunately this is already set as above also. What files is dictating the layout?

Hi @daz1uk,

It is using wp-content/plugins/woocommerce/templates/archive-product.php. Please double check your child theme in case you do have a custom template. Since you also have caching, make sure you cache too.

If the issue persists, we might need to see your setup. Please share site credentials inside a secure note.

Hi I have added login details here. I have a feeling it may be an issue with the renew woocommerce css file…?

Hello @daz1uk,

We cannot check your site because the given credentials has no access to your WP dashboard. Anyway, please go to X > Theme Options > Blog > Archives and set the Layout to “Use Global Content Layout”. This is the fallback for WooCommerce archive pages.

Hope this helps. Please let us know how it goes.

Hi,

This still hasn’t worked. I have amended the user login and tested, you should be able to login fine now. Hoping we can a solution.

Thanks,

Hi @daz1uk,

Are you referring to the grid items? Because they are already using the same layout, it’s just that the sidebar contains different widgets.

Hence, I’m assuming you’re referring to grid items. And the reason for that is because the brand archive pages are not Woocommerce by default, it’s added by a plugin called Perfect WooCommerce Brands.

For quick fix, please add this code to Theme Options > JS

jQuery('.archive.tax-pwb-brand .x-main ul.products').addClass('cols-3');

Hope this helps.

Hi @Rad, much appreciated this helps greatly, please be aware that the solution you have provided works only for the plugin that you mention.

My initial ticket was raised because taxonomy archive pages do not display correctly, as in the same as a product archive page.

For now this workaround of using the brands plugin and your js (instead of the custom attribute archive) solves my issue, thank you very much.

Hi @daz1uk,

May I know which product category page has no proper layout? I checked them and it works. But if you’re referring to taxonomy pages added by other plugins then yes, you would need to change .archive.tax-pwb-brand for it to work.

There are taxonomy pages, but not all of them belong to Woocommerce by default. But if you wish to apply that code regardless of taxonomy then add this

jQuery('.archive .x-main ul.products').addClass('cols-3');

But it may pose issues where ut’s not really needed.

Thanks!

Hi @Rad,

My initial setup was to have ‘brand’ as a product attribute rather than using a plugin. However the attribute archive pages do not have the grid layout as I think it should?

For instance this page https://shootingsuppliesltd.co.uk/model/classic/ whilst it only has one product at this point in time, the grid is missing.

I can not revert the brands to show you now, but the above link should show what I mean.

Thanks,

Hi @daz1uk,

Thank you for the clarification, for now, please follow the solution provided by Rad, you can update the selector to body[class*="tax-"] .x-main ul.products so it will target all the archive taxonomy page.

Cheers!

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