Skip to content

Instantly share code, notes, and snippets.

@justintadlock
Last active July 5, 2023 18:37
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