mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 01:52:24 +01:00
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: https://develop.svn.wordpress.org/trunk@23820 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d9ac303f83
commit
334e0eb13e
@ -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…
x
Reference in New Issue
Block a user