Files
wp-bootstrap/patterns/more-posts.php

30 lines
1.2 KiB
PHP
Raw Normal View History

<?php
/**
* Title: More posts
* Slug: wp-bootstrap/more-posts
* Categories: posts
* Description: A section with more recent posts.
*
* @package WPBootstrap
* @since 0.0.1
*/
?>
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)">
<!-- wp:heading {"fontSize":"large"} -->
<h2 class="has-large-font-size"><?php esc_html_e( 'More posts', 'wp-bootstrap' ); ?></h2>
<!-- /wp:heading -->
<!-- wp:query {"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","inherit":false},"layout":{"type":"constrained"}} -->
<!-- wp:post-template {"layout":{"type":"grid","columnCount":3}} -->
<!-- wp:group {"layout":{"type":"default"}} -->
<div class="wp-block-group">
<!-- wp:post-featured-image {"aspectRatio":"3/2","isLink":true} /-->
<!-- wp:post-title {"level":3,"isLink":true,"fontSize":"medium"} /-->
<!-- wp:post-date {"fontSize":"small"} /-->
</div>
<!-- /wp:group -->
<!-- /wp:post-template -->
<!-- /wp:query -->
</div>
<!-- /wp:group -->