Archived topic
Post category page
5 replies · Started by Ioannis on July 26, 2022
Hello, I want to create pages for the client's post categories, I started using the layout settings on the customizer, but when I couldn't make it work as I wanted, I started looking into query loops, guided by another thread I found here. I want to have 3 columns, and have fixed spaces for the post image (I want the image to shrink and fit into the allowed space) and post title (I don't want titles to appear at different heights).
I have managed to go prety far with the query loop, as I have all the styling options of generatepress, but there are some things I cannot find, plus I will have to create static pages for all categories (53 categories so far). You can see this page as a reference:
https://eikonika.aim.cat/human-eggs/ (page with query loop)
https://eikonika.aim.cat/category/human-eggs/egg-in-the-tube/ (default post category page)
Can I style the default post category page view to look as the posted query look?
If I can't fix the category page:
How can I set the query loop to show posts from a specific category?
Thank you
Hi there,
for the Theme archives, today, you would use a Block Element - Content Template:
https://docs.generatepress.com/article/block-element-content-template/
you simply design the single content template, and apply the Block Element display rules location to your Category Archives
Thank you for your reply, it took a while until I managed to get it to show the posts with the element properties, but I have a good footing now.
Now, I want the images to be contained (and fit not fill the space) to a certain size. If you have a look at the following link you will see that some images are bigger pushing the title further down.
https://eikonika.aim.cat/category/human-eggs/
The container does not have max height, do you have any ideas?
Hi there,
Try to use a GB image block instead of the dynamic image block.
The GB image block offers way more customizing options, you can set its width/height/object fill, etc.
Hello Ying, once again, I got perfect results from your replies.
Thank you cevy much.
I will mark this as solved.
Glad to hear that :)
You are welcome!