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. git-svn-id: http://core.svn.wordpress.org/trunk@23820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1b83157127
commit
a87c00edee
|
@ -10,6 +10,10 @@
|
|||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<div class="entry-media">
|
||||
<?php the_image(); ?>
|
||||
</div>
|
||||
|
||||
<?php if ( is_single() ) : ?>
|
||||
<h1 class="entry-title"><?php the_title(); ?></h1>
|
||||
<?php else : ?>
|
||||
|
@ -20,7 +24,7 @@
|
|||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?>
|
||||
<?php the_extra_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?>
|
||||
<?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>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<div class="entry-media">
|
||||
<?php the_video(); ?>
|
||||
</div>
|
||||
|
||||
<?php if ( is_single() ) : ?>
|
||||
<h1 class="entry-title"><?php the_title(); ?></h1>
|
||||
<?php else : ?>
|
||||
|
@ -20,7 +24,7 @@
|
|||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?>
|
||||
<?php the_extra_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?>
|
||||
<?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>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
|
|
|
@ -1659,6 +1659,15 @@ footer.entry-meta {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
.format-image .entry-header {
|
||||
max-width: 724px;
|
||||
}
|
||||
|
||||
.format-image .entry-header img {
|
||||
height: auto;
|
||||
max-width: 724px;
|
||||
}
|
||||
|
||||
.format-image .entry-content .size-full {
|
||||
margin: 0 -60px;
|
||||
max-width: 724px;
|
||||
|
@ -1873,6 +1882,10 @@ footer.entry-meta {
|
|||
font-weight: 400;
|
||||
}
|
||||
|
||||
.format-video .entry-header {
|
||||
max-width: 724px;
|
||||
}
|
||||
|
||||
.format-video .entry-meta {
|
||||
color: #220e10;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue