Last active
July 5, 2023 18:37
-
-
Save justintadlock/72122a851f021ba7f71db33ecd2c77c5 to your computer and use it in GitHub Desktop.
Ordering first post to second position in three-column Query Loop grid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Set default to really high number for all posts. */ | |
.wp-block-post-template-is-layout-grid .wp-block-post { | |
order: 999; | |
} | |
/* Set first post to "2" order. */ | |
.wp-block-post-template-is-layout-grid .wp-block-post:first-of-type { | |
order: 2; | |
} | |
/* Set second post to "1" order. */ | |
.wp-block-post-template-is-layout-grid .wp-block-post:nth-of-type(2) { | |
order: 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment