Ticket #17198: 17198.showcase.diff
File 17198.showcase.diff, 1.3 KB (added by , 12 years ago) |
---|
-
wp-content/themes/twentyeleven/showcase.php
23 23 <?php 24 24 // See if we have any sticky posts and use the latest to create a featured post 25 25 $sticky = get_option( 'sticky_posts' ); 26 27 // Let's roll. 28 if ( $sticky ) : 29 26 30 $featured_args = array( 27 31 'posts_per_page' => 1, 28 32 'post__in' => $sticky, … … 30 34 31 35 $featured = new WP_Query(); 32 36 $featured->query( $featured_args ); 33 34 // Let's roll. 35 if ( $sticky ) : 36 37 37 38 $featured->the_post(); 38 39 39 40 // We're going to add a class to our featured post for featured images … … 95 96 ); 96 97 $recent = new WP_Query(); 97 98 $recent->query( $recent_args ); 98 $counter = 0;99 99 100 100 while ( $recent->have_posts() ) : $recent->the_post(); 101 101 // set $more to 0 in order to only get the first part of the post 102 102 global $more; 103 103 $more = 0; 104 $counter++;105 104 106 if ( 1 == $counter) :105 if ( $recent->current_post == 0 ) : 107 106 get_template_part( 'content', get_post_format() ); 108 107 echo '<ol class="other-recent-posts">'; 109 108