Archived topic
Specify a default template for one category
3 replies · Started by Barbara on July 20, 2021
Hello. I've just switched my theme to GeneratePress and have one problem to resolve. My site is https://holeinthedonut.com/. My home page and all archive pages are set to 2 columns with right-hand sidebar. However I have one category (Featured Photos) that I need to change. The archive page for the category is displaying OK (https://holeinthedonut.com/category/daily-photo/), with 2 columns and the right-hand sidebar. But I want all the individual posts that are attached to that category to display as one column with no sidebar. I realize I can do that on individual posts by selecting a specific layout. I have done that on the most recent Featured Photo (https://holeinthedonut.com/2020/11/08/khor-virap-monastery-in-armenia-mount-ararat/) but I have 1,759 posts attached to this category and it would take forever to change each one individually. Is there a way to make the full width template the default layout for that one category? Thanks
Hi there,
you can use a Layout Element:
https://docs.generatepress.com/article/layout-element-overview/
Set its Display Rules to Post Category > 'your post category'
Thank you David, that worked perfectly!
Glad to hear that!