Make WordPress Core


Ignore:
Timestamp:
03/27/2013 06:51:47 PM (13 years ago)
Author:
lancewillett
Message:

Twenty Thirteen: take full advantage of new structured post format template functions, see r23819.

Extract first video or image from Video and Image post format posts, and place the item above the title within its own HTML wrapper with the_video() and the_image()'. Also, remove the item from the post content with the_extra_content()`.

This allows us to meet the design requirements for Twenty Thirteen with minimal changes to the theme template files. Fixes #23620.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentythirteen/content-image.php

    r23680 r23820  
    1111<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1212    <header class="entry-header">
     13        <div class="entry-media">
     14            <?php the_image(); ?>
     15        </div>
     16
    1317        <?php if ( is_single() ) : ?>
    1418        <h1 class="entry-title"><?php the_title(); ?></h1>
     
    2125
    2226    <div class="entry-content">
    23         <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?>
     27        <?php the_extra_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?>
    2428        <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    2529    </div><!-- .entry-content -->
Note: See TracChangeset for help on using the changeset viewer.