Archived topic
Different sized image for final post in an archive?
5 replies · Started by Jason on March 2, 2023
Hi there!
I created a custom content template for my archive pages, but something odd is happening with the final post that's being displayed per category archive. The image is larger than the other ones. I can seem to fix it if I toggle on "Keep default post container" in the element setting, but then it makes articles with shorter titles have smaller images. Is there a way to get the best of both worlds? I would like every image to be the same height so the page looks uniform. Thanks!
Hi Jason,
Not sure I'm seeing the issue, do you mean the last image is larger than the other two?
https://www.screencast.com/t/a0HM15XvKU
Let me know!
Hey Ying,
I sort of figured out a workaround so that's why you're not seeing the issue anymore haha. But yes, the last image was taller than the other two before I assigned it minimum and maximum heights with the same value. I can revert it back if you want to take a look, if there's a better solution than what I am doing.
Thanks!
No worries, I get it :)
Try removing the max-height and min-height, then add this CSS :
.one-container.archive .generate-columns-container .post.dynamic-content-template {
padding-bottom: 0;
}
.one-container.archive .generate-columns-container {
row-gap: 30px;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
That worked, thank you!
No problem :)