Archived topic
Category page images
8 replies · Started by Kevin on March 9, 2019
Hello-
On my category pages the featured images are different sizes sometimes (see the last four entries). I've read the below but no matter what setting I put (auto or a specific size) I still can not get the images to be all the same size. And I have zero experience with setting up wordpress tags CSS etc.
https://docs.generatepress.com/article/adjusting-the-featured-images/
Also I tried to set up something similar with an Elementor page and the same issue happens; the images for the posts end up having different sizes.
How do I fix it so that the featured image is always the same size when setting up a category like page?
Thanks,
Kevin
Correction to the above; it does not happen in Elementor - just remembering the issue was fixed if its an Elementor page.
Only happens on a regular GP category page
Hi there,
the images are being lazy-loaded by another plugin hence the Blog featured images settings are not working. The best thing is to ensure that all original images are of the same size or at least aspect ratio but if no doable then we can use some CSS like so:
@media (min-width: 768px) {
:not(.single) .post:not(.featured-column) .post-image img {
height: 357px;
object-fit: cover;
}
}
Thanks David
So would i go to customize and use the "additional CSS" (copy and paste)? I also have Simple CSS as an option as well.
If I was to use Elementor; how do I use Elementor for Category pages?
Thats correct, Simple CSS and Addtional CSS do the same thing, so seeing as you have the Simple CSS just use that.
You need their Pro version and they have this documentation:
https://docs.elementor.com/article/339-creating-an-archive-template-with-elementor-pro
What in particular do you feel the need to use Elementor in archives for? Just curious
Great thank you!
I might want to customize the category pages more than I'm able to at this point. Add a some text, contact form etc. I tried using a hook for some basic stuff however I was not very successful.
You're welcome.
Just ask if you need a hand with hooking content or general styling, more than happy to help.
As a halfway house you can add Elementor Template shortcodes to hooks :)
The CSS you provided worked; forgot about the short code - hook. I might try that. Question; if I were to use Elementor (not use a hook) to replace the current layout does do just that or is there a redirect that happens?
No redirect, it just adds a conditonal query that grabs the elementor archive template in place of the themes template.