TwentyEleven: Always call the loop properly in all template files rather than just calling the_post(). Fixes #18794 props mfields.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2011-11-21 16:20:49 +00:00
parent edef2fb572
commit 13b56f8880
4 changed files with 61 additions and 53 deletions

View File

@ -12,7 +12,7 @@ get_header(); ?>
<div id="primary" class="image-attachment">
<div id="content" role="main">
<?php the_post(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<nav id="nav-single">
<h3 class="assistive-text"><?php _e( 'Image navigation', 'twentyeleven' ); ?></h3>
@ -95,6 +95,8 @@ get_header(); ?>
<?php comments_template(); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #primary -->

View File

@ -17,12 +17,14 @@ get_header(); ?>
<div id="primary">
<div id="content" role="main">
<?php the_post(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #primary -->

View File

@ -22,7 +22,7 @@ get_header(); ?>
<div id="primary" class="showcase">
<div id="content" role="main">
<?php the_post(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/**
@ -33,6 +33,8 @@ get_header(); ?>
get_template_part( 'content', 'intro' );
?>
<?php endwhile; ?>
<?php
/**
* Begin the featured posts section.

View File

@ -13,12 +13,14 @@ get_header(); ?>
<div id="primary">
<div id="content" role="main">
<?php the_post(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #primary -->