Skip to content

Instantly share code, notes, and snippets.

@tdmrhn
Created March 10, 2024 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdmrhn/b1cbdbbb9b02ba06ecd627810336a0a0 to your computer and use it in GitHub Desktop.
Save tdmrhn/b1cbdbbb9b02ba06ecd627810336a0a0 to your computer and use it in GitHub Desktop.
Blocksy 2: Easy Bento Grid for Archives with Customizer Grid Type
.entries[data-layout="grid"] article:first-child,
.entries[data-layout="grid"] article:nth-child(7n+1) {
grid-column: span 2;
}
.entries[data-layout="grid"] article:first-child,
.entries[data-layout="grid"] article:nth-child(5n+1) {
grid-row: span 2;
}
@tdmrhn
Copy link
Author

tdmrhn commented Mar 10, 2024

/* use this code for custom post type archive */
/* change "projects" with you own CPT slug */
 [data-prefix="projects_archive"] .entries[data-layout="grid"] article:first-child,
 [data-prefix="projects_archive"] .entries[data-layout="grid"]  article:nth-child(7n+1) { 
  grid-column: span 2; 
}
 [data-prefix="projects_archive"] .entries[data-layout="grid"]  article:first-child,
 [data-prefix="projects_archive"] .entries[data-layout="grid"]  article:nth-child(5n+1) { 
  grid-row: span 2; 
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment