[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentytwentyfive/patterns/ -> template-home-posts-grid-news-blog.php (source)

   1  <?php
   2  /**
   3   * Title: News blog with featured posts grid
   4   * Slug: twentytwentyfive/template-home-posts-grid-news-blog
   5   * Template Types: front-page, index, home
   6   * Inserter: no
   7   *
   8   * @package WordPress
   9   * @subpackage Twenty_Twenty_Five
  10   * @since Twenty Twenty-Five 1.0
  11   */
  12  
  13  ?>
  14  <!-- wp:template-part {"slug":"header-large-title"} /-->
  15  
  16  <!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"default"}} -->
  17  <main class="wp-block-group" style="margin-top:0;margin-bottom:0;">
  18  
  19      <!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
  20      <div class="wp-block-group" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)">
  21          <!-- wp:query {"query":{"perPage":1,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false},"align":"wide"} -->
  22          <div class="wp-block-query alignwide">
  23              <!-- wp:post-template -->
  24                  <!-- wp:post-featured-image {"isLink":true,"aspectRatio":"16/9","align":"wide"} /-->
  25                  <!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|40"}}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
  26                  <div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--40)">
  27                      <!-- wp:post-title {"textAlign":"center","level":1,"isLink":true,"fontSize":"xx-large"} /-->
  28                      <!-- wp:post-terms {"term":"category","textAlign":"center","style":{"typography":{"textTransform":"uppercase","letterSpacing":"1.4px"}}} /-->
  29                      <!-- wp:post-date {"textAlign":"center","isLink":true} /-->
  30                  </div>
  31                  <!-- /wp:group -->
  32              <!-- /wp:post-template -->
  33              <!-- wp:query-no-results -->
  34                  <!-- wp:paragraph {"align":"center","placeholder":"<?php esc_attr_e( 'Add text or blocks that will display when a query returns no results.', 'twentytwentyfive' ); ?>"} -->
  35                  <p class="has-text-align-center"><?php echo esc_html_x( 'Sorry, but nothing was found. Please try a search with different keywords.', 'Message explaining that there are no results returned from a search.', 'twentytwentyfive' ); ?></p>
  36                  <!-- /wp:paragraph -->
  37              <!-- /wp:query-no-results -->
  38          </div>
  39          <!-- /wp:query -->
  40      </div>
  41      <!-- /wp:group -->
  42  
  43      <!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
  44      <div class="wp-block-group" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)">
  45          <!-- wp:group {"align":"wide","style":{"spacing":{"blockGap":"var:preset|spacing|50"}},"layout":{"type":"grid","columnCount":null,"minimumColumnWidth":"40rem"}} -->
  46          <div class="wp-block-group alignwide">
  47              <!-- wp:query {"query":{"perPage":1,"pages":0,"offset":"1","postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":null,"parents":[]}} -->
  48              <div class="wp-block-query">
  49                  <!-- wp:post-template -->
  50                      <!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"}},"layout":{"type":"default"}} -->
  51                      <div class="wp-block-group">
  52                          <!-- wp:post-featured-image {"isLink":true,"aspectRatio":"3/2"} /-->
  53                          <!-- wp:post-title {"isLink":true,"fontSize":"x-large"} /-->
  54                          <!-- wp:post-terms {"term":"category","style":{"typography":{"textTransform":"uppercase","letterSpacing":"1.4px"}}} /-->
  55                      </div>
  56                      <!-- /wp:group -->
  57                  <!-- /wp:post-template -->
  58                  <!-- wp:query-no-results -->
  59                  <!-- wp:paragraph -->
  60                  <p><?php echo esc_html_x( 'Sorry, but nothing was found. Please try a search with different keywords.', 'Message explaining that there are no results returned from a search.', 'twentytwentyfive' ); ?></p>
  61                  <!-- /wp:paragraph -->
  62                  <!-- /wp:query-no-results -->
  63              </div>
  64              <!-- /wp:query -->
  65              <!-- wp:query {"query":{"perPage":1,"pages":0,"offset":"2","postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":null,"parents":[]}} -->
  66              <div class="wp-block-query">
  67                  <!-- wp:post-template -->
  68                      <!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"}},"layout":{"type":"default"}} -->
  69                      <div class="wp-block-group">
  70                          <!-- wp:post-featured-image {"isLink":true,"aspectRatio":"3/2"} /-->
  71                          <!-- wp:post-title {"isLink":true,"fontSize":"x-large"} /-->
  72                          <!-- wp:post-terms {"term":"category","style":{"typography":{"textTransform":"uppercase","letterSpacing":"1.4px"}}} /-->
  73                      </div>
  74                      <!-- /wp:group -->
  75                  <!-- /wp:post-template -->
  76                  <!-- wp:query-no-results -->
  77                  <!-- wp:paragraph -->
  78                  <p><?php echo esc_html_x( 'Sorry, but nothing was found. Please try a search with different keywords.', 'Message explaining that there are no results returned from a search.', 'twentytwentyfive' ); ?></p>
  79                  <!-- /wp:paragraph -->
  80                  <!-- /wp:query-no-results -->
  81              </div>
  82              <!-- /wp:query -->
  83          </div>
  84          <!-- /wp:group -->
  85      </div>
  86      <!-- /wp:group -->
  87  
  88      <!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
  89      <div class="wp-block-group" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)">
  90          <!-- wp:query {"query":{"perPage":3,"pages":0,"offset":"3","postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":null,"parents":[]},"align":"wide"} -->
  91          <div class="wp-block-query alignwide">
  92              <!-- wp:post-template {"style":{"spacing":{"blockGap":"var:preset|spacing|50"}},"layout":{"type":"grid","columnCount":3}} -->
  93                  <!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"}},"layout":{"type":"default"}} -->
  94                  <div class="wp-block-group">
  95                      <!-- wp:post-featured-image {"isLink":true,"aspectRatio":"4/3"} /-->
  96                      <!-- wp:post-title {"isLink":true,"fontSize":"large"} /-->
  97                      <!-- wp:post-terms {"term":"category","style":{"typography":{"textTransform":"uppercase","letterSpacing":"1.4px"}}} /-->
  98                  </div>
  99                  <!-- /wp:group -->
 100              <!-- /wp:post-template -->
 101              <!-- wp:query-no-results -->
 102              <!-- wp:paragraph -->
 103              <p><?php echo esc_html_x( 'Sorry, but nothing was found. Please try a search with different keywords.', 'Message explaining that there are no results returned from a search.', 'twentytwentyfive' ); ?></p>
 104              <!-- /wp:paragraph -->
 105              <!-- /wp:query-no-results -->
 106          </div>
 107          <!-- /wp:query -->
 108      </div>
 109      <!-- /wp:group -->
 110  
 111      <!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
 112      <div class="wp-block-group alignwide" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)">
 113          <!-- wp:heading {"align":"wide"} -->
 114          <h2 class="wp-block-heading alignwide"><?php esc_html_e( 'Architecture', 'twentytwentyfive' ); ?></h2>
 115          <!-- /wp:heading -->
 116          <!-- wp:query {"query":{"perPage":6,"pages":0,"offset":"6","postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":null,"parents":[]},"align":"wide","layout":{"type":"default"}} -->
 117          <div class="wp-block-query alignwide">
 118              <!-- wp:post-template {"align":"full","style":{"spacing":{"blockGap":"0"}},"layout":{"type":"default"}} -->
 119                  <!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|30","bottom":"var:preset|spacing|30"}},"border":{"bottom":{"color":"var:preset|color|accent-6","width":"1px"},"top":[],"right":[],"left":[]}},"layout":{"type":"flex","flexWrap":"nowrap","verticalAlignment":"center","justifyContent":"space-between"}} -->
 120                  <div class="wp-block-group alignfull" style="border-bottom-color:var(--wp--preset--color--accent-6);border-bottom-width:1px;padding-top:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30)">
 121                      <!-- wp:post-title {"level":3,"isLink":true,"fontSize":"large"} /-->
 122                      <!-- wp:post-date {"textAlign":"right","isLink":true} /-->
 123                  </div>
 124                  <!-- /wp:group -->
 125              <!-- /wp:post-template -->
 126              </div>
 127          <!-- /wp:query -->
 128      </div>
 129      <!-- /wp:group -->
 130  
 131  </main>
 132  <!-- /wp:group -->
 133  
 134  <!-- wp:pattern {"slug":"twentytwentyfive/cta-newsletter"} /-->
 135  
 136  <!-- wp:template-part {"slug":"footer-columns"} /-->


Generated : Sun Nov 24 08:20:01 2024 Cross-referenced by PHPXref