Skip to content

Instantly share code, notes, and snippets.

@justintadlock
Last active July 5, 2023 18:37
Show Gist options
  • Save justintadlock/72122a851f021ba7f71db33ecd2c77c5 to your computer and use it in GitHub Desktop.
Save justintadlock/72122a851f021ba7f71db33ecd2c77c5 to your computer and use it in GitHub Desktop.
Ordering first post to second position in three-column Query Loop grid
/* 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