Archived topic
Alternating Post Loop Entry
3 replies · Started by Stefan on January 2, 2018
Hi Tom,
First off, thank you for making this amazing amazing theme, and also for your support and dedication. I could always find a support forum thread that answered my many questions, up until now, I've been researching high and low for it in these couple of days but find no luck.
Anyway, I hope the title of this post is correct, because I don't know the correct term.
I am trying to achieve an alternating layout for the blog post entry loop in one of my project, is there any way to do it? I have the GP Premium and also is using Elementor Pro.
This is the sample website that I am trying to achieve https://lippielust.com/
In the website, its blog post entry layout is alternating, what I meant is the first post has its image on the left, and the next is on the right, and then back to the left and so on, and also when the post don't have any image the content is centered.
Thank you
Hi there,
Good question and cool layout :)
Can you give this CSS a shot:
.post-image-aligned-left .type-post:nth-child(even) .inside-article .post-image {
margin-left: 2em;
float: right;
text-align: right;
}
Assuming that you have the featured images set to below title and align left:
https://docs.generatepress.com/article/adjusting-the-featured-images/
Hi Leo,
I only got the chance to try it now and it worked like charm.
I can see so much layout design potential with this theme and this css nth-child().
Thank you sir.
No problem!
Glad it's working :)