Archived topic
Left sidebar only on a specific product category
11 replies · Started by Stefano on June 29, 2022
Hi there,
I'm working on a new woocommerce project again with the awesome generatepress!
I wanted to know if it is possible to put a left sidebar only on a specific product category.
Thanks!
Stefano
Hi there,
you can create your sidebar.
Then use a Layout Element:
https://docs.generatepress.com/article/layout-element-overview/
To disable the Sidebar where you don't require it.
Set the Location to: Entire Site
Set the Exclusion to: Product Category Archive -> Your product catgory
Hi David!
I tried according to your instructions but it doesn't work.
I don't know if I am doing something wrong.
In your layout element the Posizione should be set to: Intero Sito
I also tried this but it doesn't work
Can you share a link to a page where the sidebar should NOT be shown ?
Hi David,
The left sidebar is active on all product categories on the website.
https://faillaprodottitipici.com/birre-siciliane-artigianali/
https://faillaprodottitipici.com/salumi-siciliani/
https://faillaprodottitipici.com/olio-siciliano/
I need all product categories to be without sidebar. I would like the left sidebar to be active only on this product category:
Hi Stefano,
There's a sidebar setting for Woocommerce at customizer > layout > Woocommerce, give it a try:
https://docs.generatepress.com/article/woocommerce-overview/#shop
But layout element should override that setting.
Can you try disabling all plugins except GP premium & Woocommerce and switching to the parent theme to test?
Hi Ying,
I disabled the child theme and removed the left sidebar from layout > Woocommerce
What can I do to see the left sidebar on this product category?
https://faillaprodottitipici.com/vini-siciliani/
The layout element isn't working as it's supposed to, there might be some plugin conflicts.
Can you disable all your other plugins to debug?
Hi Ying!
I solved the problem! There was a code snippet activated with codesnippet plugin that created a conflict.
Everything is ok now!
Great! Happy to hear that :)