Using the content column classes built into Genesis, you can display posts in 2, 3, 4 & 6 columns on any blog listings page, including archive, author, blog, category, search, and tag pages.
Lets take a look at 2 code examples which generate 2 and 3 columns of posts on archive pages.
2 Columns #
And here’s the PHP code you can copy from the view raw link in the Gist and paste at the end of your child themes functions.php file.
3 Columns #
Here’s the PHP code you can copy from the view raw link in the Gist and paste at the end of your child themes functions.php file.
4 Columns #
Here’s the PHP code you can copy from the view raw link in the Gist and paste at the end of your child themes functions.php file or archive type template file.
Blog Page Template Columns #
Use the genesis_is_blog_template conditional tag to display entries in columns on any page using the blog page template.
Note : This code works in archives using the WordPress Template Hierarchy and won’t work with Genesis Featured Pages/Posts widget. You can use CSS with the Genesis featured page & featured post widgets to display entries in columns.
Mobile Responsive Columns #
All Responsive StudioPress child themes include Media Queries at the end of the themes style.css file which make the content column classes re-size at different screen sizes so they’re mobile responsive.
Columns On Archives With Genesis Featured Posts Widget
If your archive also includes a widget area populated with the Genesis featured posts widget, you may find the code effects the loop in the widget in which case you’ll need to add the folowing to the conditionals:
is_main_query()
Hey Brad,
How would I approach creating a custom page template using this formatting? My objective is to have this layout to a specific category.
Would this do it?
No. You have 2 options. Use the 1st code snippet in functions.php like this :
Or
You can use the code in a category template file like this without the conditional tag and name the file category-news.php using the WordPress Template Hierarchy.
Link to your category archive page please.
I’m about to try this out and was wondering how I set this up for only one category and not all categories?
Change the conditional tag from archive to category and add your category slug like this example: