Archived topic
Post columns
9 replies · Started by Dan on October 20, 2022
What would be the best way to set up columns for various types of post types (incl. the post post type)?
Is it still with the 'generate_blog'columns' filter? https://docs.generatepress.com/article/using-columns-in-the-blog/
Or with the new loop template block element will we have an option to set a different number of columns per post type and taxonomy type?
Thanks!
Dan
Hi Dan,
You should be able to add a query loop block to a block element - loop template using the latest GP and GP premium, toggle the Inherit query from template option.
For more info: https://docs.generatepress.com/article/block-element-loop-template/
Thanks Ying,
And In the query loop block I can adjust the number of grid columns and that will apply to the archive location (tags, category / CPT etc...)?
Am I correct?
Dan
And In the query loop block I can adjust the number of grid columns and that will apply to the archive location (tags, category / CPT etc…)?
yes, basically you can build the archive page using the query loop block entirely.
Excellent. Looking forward to the release.
Dan
It could be anytime soon :)
I'll take that as a hint...
The rc versions are both out, you can download them at generatepress.com/account
You can have a try now :)
Inherit query from template option, what are the benefits of that?
It removes the other options of the element (number of posts, query parameters etc...)
The idea is that we create one template loop, turn on Inherit query from template, and WP will do the querying?
Setting the number of posts to show would be done by settings => Reading
would I still need to set the location?
Hi there,
The idea is that we create one template loop, turn on Inherit query from template, and WP will do the querying?
Correct.
Setting the number of posts to show would be done by settings => Reading
Correct.
would I still need to set the location?
And correct. eg. Blog, or All Archives or Category Archives etc.