Archived topic
Multiple Post Layouts
3 replies · Started by Matt on August 25, 2021
Hi Guys,
Just wondering if I'm missing something obvious here.
I currently have a 'content template' for the post archive built with elements. It uses dynamic text elements to pull in ACF fields etc and each post takes 100% width.
I am wanting to have a 3 column gallery style layout of the same posts on a tag archive page (ie. mysite.com/tag/gallery), also using elements to create this 'content template'.
As the customiser options apply globally to archive pages, only one of my layouts will work at a time. Is there a way to achieve the 2 different column layouts at the same time?
Thanks
Hi Matt,
The archive columns are generally adjusted through Appearance > Customize > Layout > Blog.
It's this option - https://share.getcloudapp.com/o0uPEGD2
But this applies to ALL archive pages.
If you want to specify which category, you'll need this filter -
https://docs.generatepress.com/article/using-columns-in-the-blog/#changing-the-number-of-columns
and change the is_search() in the if() condition to is_category('your-category-slug-here')
Awesome.. Thanks for that!
No problem. :)