Archived topic
Display posts in categories on home page
5 replies · Started by Susan on August 10, 2022
Hi
I am struggling to work out how I can display posts by categories on my front page.
I would like to have 3-4 columns each displaying archived posts form a different category.
How can I do that with the block editor please?
Hi there,
You would need to create a static page for the home page and build it with the Query Loop block from GB:
https://docs.generateblocks.com/article/query-loop-overview/
Hi Leo
I have read the overview on the Query Loop block. It doesn't mention categories though.
My site was originally a blog and I have very many posts which are categorised by theme.
What I would like to do is create a, say, 3x3 grid displaying the category page for 9 themes.
Is that possible.?
Could you give me more detail about how I use the query Loop block to achieve that?
Thanks
Hi there,
when you add a GB Query Loop it will have the default parameters shown here:
https://docs.generateblocks.com/article/query-loop-overview/#query-parameters
If you click Add Parameter you will be given an option to Add Query Parameter do that.
Then select Taxonomy -> then choose Category and then choose the Term(s) you want in that list.
You can add as many Parameters as you need. And you can add many Query Loop blocks as you require. Although i would recommend not too many as each of them will add overhead to the page processing.
Hi David
I have had a go but have come across 2 problems.
I would like 3 a 3 column layout including the featured images but the query block layout does not include that option. The documentation does not help with that unfortunately (as far as I can see).
Also with the parameter- I have managed to set it to include posts within a particular category but I can not set it to include the category archive page. Is that not possible?
I would like 3 a 3 column layout including the featured images but the query block layout does not include that option.
Select the Grid block of the Query loop block, and set its width to 33.3%, it will have 3 columns.
but I can not set it to include the category archive page. Is that not possible?
I'm not sure I fully understand, can you explain a bit more?