Make WordPress Core


Ignore:
Timestamp:
10/28/2013 05:52:45 PM (11 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: Fix gallery posts in the ephemera widget. Props iamtakashi, fixes #25740.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/content-gallery.php

    r25802 r25970  
    77 * @since Twenty Fourteen 1.0
    88 */
    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;
    259?>
    2610
    2711<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(); ?>
    3713
    3814    <header class="entry-header">
Note: See TracChangeset for help on using the changeset viewer.