[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentytwentyfour/patterns/ -> posts-grid-2-col.php (source)

   1  <?php
   2  /**
   3   * Title: Grid of posts featuring the first post, 2 columns
   4   * Slug: twentytwentyfour/posts-grid-2-col
   5   * Categories: query
   6   * Block Types: core/query
   7   * Description: A grid of posts featuring the first post, 2 columns.
   8   */
   9  ?>
  10  
  11  <!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50","right":"var:preset|spacing|50"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
  12  <div class="wp-block-group alignfull" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
  13      <!-- wp:heading {"align":"wide","style":{"typography":{"lineHeight":"1"},"spacing":{"margin":{"top":"0"}}},"fontSize":"x-large"} -->
  14      <h2 class="wp-block-heading alignwide has-x-large-font-size" style="margin-top:0;line-height:1"><?php esc_html_e( 'Watch, Read, Listen', 'twentytwentyfour' ); ?></h2>
  15      <!-- /wp:heading -->
  16  
  17      <!-- wp:spacer {"height":"var:preset|spacing|10","style":{"spacing":{"margin":{"top":"0","bottom":"0"}}}} -->
  18      <div style="margin-top:0;margin-bottom:0;height:var(--wp--preset--spacing--10)" aria-hidden="true" class="wp-block-spacer">
  19      </div>
  20      <!-- /wp:spacer -->
  21  
  22      <!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|50","left":"var:preset|spacing|30"}}}} -->
  23      <div class="wp-block-columns alignwide">
  24          <!-- wp:column {"width":"60%"} -->
  25          <div class="wp-block-column" style="flex-basis:60%">
  26              <!-- wp:query {"query":{"perPage":1,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"exclude","inherit":false}} -->
  27              <div class="wp-block-query">
  28                  <!-- wp:post-template {"style":{"spacing":{"blockGap":"0"}}} -->
  29                  <!-- wp:post-featured-image {"isLink":true,"aspectRatio":"3/4"} /-->
  30  
  31                  <!-- wp:spacer {"height":"var:preset|spacing|10"} -->
  32                  <div style="height:var(--wp--preset--spacing--10)" aria-hidden="true" class="wp-block-spacer">
  33                  </div>
  34                  <!-- /wp:spacer -->
  35  
  36                  <!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"layout":{"type":"flex","orientation":"vertical","flexWrap":"nowrap"}} -->
  37                  <div class="wp-block-group">
  38                      <!-- wp:post-title {"level":3,"isLink":true,"fontSize":"x-large"} /-->
  39  
  40                      <!-- wp:post-excerpt {"excerptLength":35} /-->
  41  
  42                      <!-- wp:template-part {"slug":"post-meta"} /-->
  43  
  44                  </div>
  45                  <!-- /wp:group -->
  46                  <!-- /wp:post-template -->
  47              </div>
  48              <!-- /wp:query -->
  49          </div>
  50          <!-- /wp:column -->
  51  
  52          <!-- wp:column {"width":"40%"} -->
  53          <div class="wp-block-column" style="flex-basis:40%">
  54              <!-- wp:query {"query":{"perPage":2,"pages":0,"offset":1,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false}} -->
  55              <div class="wp-block-query">
  56                  <!-- wp:post-template {"style":{"spacing":{"blockGap":"var:preset|spacing|40"}}} -->
  57                  <!-- wp:post-featured-image {"isLink":true,"aspectRatio":"4/3"} /-->
  58  
  59                  <!-- wp:spacer {"height":"5px","style":{"layout":{}}} -->
  60                  <div style="height:5px" aria-hidden="true" class="wp-block-spacer">
  61                  </div>
  62                  <!-- /wp:spacer -->
  63  
  64                  <!-- wp:group {"style":{"spacing":{"blockGap":"8px"}},"layout":{"type":"flex","orientation":"vertical","flexWrap":"nowrap"}} -->
  65                  <div class="wp-block-group">
  66                      <!-- wp:post-title {"level":3,"isLink":true,"fontSize":"large"} /-->
  67  
  68                      <!-- wp:post-excerpt {"excerptLength":14,"fontSize":"small"} /-->
  69                      <!-- wp:template-part {"slug":"post-meta"} /-->
  70  
  71                  </div>
  72                  <!-- /wp:group -->
  73                  <!-- /wp:post-template -->
  74              </div>
  75              <!-- /wp:query -->
  76          </div>
  77          <!-- /wp:column -->
  78      </div>
  79      <!-- /wp:columns -->
  80  </div>
  81  <!-- /wp:group -->


Generated : Sun Dec 22 08:20:01 2024 Cross-referenced by PHPXref