- Timestamp:
- 10/28/2013 05:52:45 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/content-gallery.php
r25802 r25970 7 7 * @since Twenty Fourteen 1.0 8 8 */ 9 10 if ( has_post_thumbnail() ) :11 $image = get_post_thumbnail_id();12 else :13 $images = get_posts( array(14 'post_parent' => get_the_ID(),15 'fields' => 'ids',16 'numberposts' => 1,17 'post_status' => 'inherit',18 'post_type' => 'attachment',19 'post_mime_type' => 'image',20 'order' => 'ASC',21 'orderby' => 'menu_order ID',22 ) );23 $image = array_shift( $images );24 endif;25 9 ?> 26 10 27 11 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 28 <?php if ( is_single() && $image ) : ?> 29 <div class="featured-thumbnail"> 30 <?php echo wp_get_attachment_image( $image, 'featured-thumbnail-large' ); ?> 31 </div> 32 <?php elseif ( $image ) : ?> 33 <a class="featured-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>"> 34 <?php echo wp_get_attachment_image( $image, 'featured-thumbnail-large' ); ?> 35 </a> 36 <?php endif; ?> 12 <?php twentyfourteen_post_thumbnail(); ?> 37 13 38 14 <header class="entry-header">
Note: See TracChangeset
for help on using the changeset viewer.