Archived topic
Change blog layout based on category?
1 reply · Started by dale on October 22, 2018
I've used categories to create different sub-blogs on my site, and now I'm wondering if I can change the number of sidebars on a blog post based on the post's (or archive's) category. In the section (category and subcategories) of my blog linked below, I'd like to have both a left and a right sidebar, whereas for the rest of the categories I only need the righthand sidebar.
Is this doable with code?
Hi there,
You should be able to do that with Layout Element now:
https://docs.generatepress.com/article/layout-element-overview/
The categories should be in Display Rule.
Let me know if this helps :)