-
reora
in this older post, a solution for alternating the columns in rows of a grid is shown:
https://generatepress.com/forums/topic/setting-left-right-layout-for-archives-with-dynamic-elements/however, i’m trying to get this to work in gb2 query/looper/loop item pattern and i can’t get it to work.
should the ‘alternating-layout’ class be added to the query, or looper, or loop-item, or grid, or… ???
thanks!
-
Hi there,
should the ‘alternating-layout’ class be added to the query, or looper, or loop-item, or grid, or… ???
to the looper.
If it doesn’t work, can you link us to your site?
-
reora
it’s in looper. url in private info, thank you!
-
You are using Grid, and the CSS code is for Flex, so no, it won’t work.
Try adding this CSS instead:
.alternating-layout .gb-loop-item:nth-child(2n) > div { grid-auto-flow: row; direction: rtl; }
-
reora
you are a star! thank you!!
-
You are welcome 🙂
- You must be logged in to reply to this topic.