Archived topic
Hide a category sidebar
5 replies · Started by Nico on March 25, 2022
Hello and good morning!
Is it possible to hide the sidebar for ONE specific category in GP? However, all other category representations should not be affected.
The category and page in question see private area.
Thanks for your help in advance.
Nico
Hi Nico,
This is doable through a Layout Element.
Specifically, you’ll need to set a Sidebar Layout and display it only on the specific Archive page.
For example:
https://share.getcloudapp.com/yAuKlGeo
https://share.getcloudapp.com/YEuryqbO
For reference: https://docs.generatepress.com/article/layout-element-overview/
Hope this helps! :)
Thnx for you quick reply Fernando.
We don't work with Element (yet). Is it possible to hide the sidebar with a CSS snippet?
I see. If you wish to use CSS, here is something you can try:
.archive.category-3600 div#right-sidebar {
display:none;
}
.archive.category-3600 div.content-area {
width:100%;
}
Here is an article with regards to adding CSS: https://docs.generatepress.com/article/adding-css/#additional-css
Adding it through additional CSS should work.
Kindly let us know how it goes. :)
Great. It's working. Thnx Fernando and greetings from Germany.
Nick
You’re welcome Nick! Glad to be of assistance! Feel free to reach out anytime if you’ll need assistance with anything else. Greetings! :)