Changeset 42343 for trunk/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php
r39286 r42343 15 15 <article id="panel<?php echo $twentyseventeencounter; ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> > 16 16 17 <?php if ( has_post_thumbnail() ) : 17 <?php 18 if ( has_post_thumbnail() ) : 18 19 $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' ); 19 20 … … 40 41 <?php 41 42 /* translators: %s: Name of current post */ 42 the_content( sprintf( 43 __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), 44 get_the_title() 45 ) ); 43 the_content( 44 sprintf( 45 __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), 46 get_the_title() 47 ) 48 ); 46 49 ?> 47 50 </div><!-- .entry-content --> … … 49 52 <?php 50 53 // Show recent blog posts if is blog posts page (Note that get_option returns a string, so we're casting the result as an int). 51 if ( get_the_ID() === (int) get_option( 'page_for_posts' ) ) : ?> 54 if ( get_the_ID() === (int) get_option( 'page_for_posts' ) ) : 55 ?> 52 56 53 <?php // Show four most recent posts. 54 $recent_posts = new WP_Query( array( 55 'posts_per_page' => 3, 56 'post_status' => 'publish', 57 'ignore_sticky_posts' => true, 58 'no_found_rows' => true, 59 ) ); 57 <?php 58 // Show four most recent posts. 59 $recent_posts = new WP_Query( 60 array( 61 'posts_per_page' => 3, 62 'post_status' => 'publish', 63 'ignore_sticky_posts' => true, 64 'no_found_rows' => true, 65 ) 66 ); 60 67 ?> 61 68 62 <?php if ( $recent_posts->have_posts() ) : ?>69 <?php if ( $recent_posts->have_posts() ) : ?> 63 70 64 71 <div class="recent-posts"> 65 72 66 73 <?php 67 while ( $recent_posts->have_posts() ) : $recent_posts->the_post(); 74 while ( $recent_posts->have_posts() ) : 75 $recent_posts->the_post(); 68 76 get_template_part( 'template-parts/post/content', 'excerpt' ); 69 77 endwhile;
Note: See TracChangeset
for help on using the changeset viewer.