grid-of-posts.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Title: Grid of blog posts
  4. * Slug: masu/grid-of-posts
  5. * Categories: featured, query, blog
  6. */
  7. ?>
  8. <!-- wp:query {"query":{"perPage":"8","pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true},"displayLayout":{"type":"flex","columns":4},"align":"wide"} -->
  9. <div class="wp-block-query alignwide">
  10. <!-- wp:post-template -->
  11. <!-- wp:group {"style":{"visualizers":{"padding":{"top":true,"right":true,"bottom":true,"left":true}}},"layout":{"inherit":false}} -->
  12. <div class="wp-block-group">
  13. <!-- wp:group {"style":{"spacing":{"blockGap":"16px"}},"layout":{"type":"constrained","justifyContent":"left"}} -->
  14. <div class="wp-block-group">
  15. <!-- wp:post-featured-image {"isLink":true} /-->
  16. <!-- wp:post-title {"isLink":true,"style":{"typography":{"lineHeight":"1.6","fontStyle":"normal","fontWeight":"600"},"elements":{"link":{"color":{"text":"var:preset|color|foreground"}}}},"fontSize":"small"} /-->
  17. <!-- wp:spacer {"height":"1rem","style":{"spacing":{"margin":{"top":"0.625rem"}}}} -->
  18. <div style="margin-top:0.625rem;height:1rem" aria-hidden="true" class="wp-block-spacer"></div>
  19. <!-- /wp:spacer -->
  20. </div>
  21. <!-- /wp:group -->
  22. </div>
  23. <!-- /wp:group -->
  24. <!-- /wp:post-template -->
  25. <!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"space-between"}} -->
  26. <!-- wp:query-pagination-previous /-->
  27. <!-- wp:query-pagination-numbers /-->
  28. <!-- wp:query-pagination-next /-->
  29. <!-- /wp:query-pagination -->
  30. </div>
  31. <!-- /wp:query -->