Switch to get_template_part Fixes #12371. Try on some narrative comments for size see #12695.

git-svn-id: http://svn.automattic.com/wordpress/trunk@13816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2010-03-25 22:04:27 +00:00
parent 4f46d6537c
commit 1111996fe1
6 changed files with 42 additions and 10 deletions

View File

@ -16,8 +16,13 @@
<?php endif; ?>
<?php rewind_posts(); ?>
<?php get_generic_template( 'loop', 'archive' ); ?>
<?php
/* Run the loop for the archives page to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-archives.php and that will be used instead.
*/
get_template_part( 'loop', 'archive' );
?>
</div><!-- #content -->
</div><!-- #container -->

View File

@ -21,8 +21,13 @@
<?php rewind_posts(); ?>
<?php get_generic_template( 'loop', 'author' ); ?>
<?php
/* Run the loop for the author archive page to output the authors posts
* If you want to overload this in a child theme then include a file
* called loop-author.php and that will be used instead.
*/
get_template_part( 'loop', 'author' );
?>
</div><!-- #content -->
</div><!-- #container -->

View File

@ -8,7 +8,13 @@
?></h1>
<?php $categorydesc = category_description(); if ( ! empty( $categorydesc ) ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>' ); ?>
<?php get_generic_template( 'loop', 'category' ); ?>
<?php
/* Run the loop for the category page to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-category.php and that will be used instead.
*/
get_template_part( 'loop', 'category' );
?>
</div><!-- #content -->
</div><!-- #container -->

View File

@ -3,8 +3,13 @@
<div id="container">
<div id="content">
<?php get_generic_template( 'loop', 'index' ); ?>
<?php
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*/
get_template_part( 'loop', 'index' );
?>
</div><!-- #content -->
</div><!-- #container -->

View File

@ -5,7 +5,13 @@
<?php if ( have_posts() ) : ?>
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyten' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
<?php get_generic_template( 'loop', 'search' ); ?>
<?php
/* Run the loop for the search to output the results.
* If you want to overload this in a child theme then include a file
* called loop-search.php and that will be used instead.
*/
get_template_part( 'loop', 'search' );
?>
<?php else : ?>
<div id="post-0" class="post no-results not-found">
<h2 class="entry-title"><?php _e( 'Nothing Found', 'twentyten' ); ?></h2>

View File

@ -11,8 +11,13 @@
<?php rewind_posts(); ?>
<?php get_generic_template( 'loop', 'tag' ); ?>
<?php
/* Run the loop for the tag archive to output the posts
* If you want to overload this in a child theme then include a file
* called loop-tag.php and that will be used instead.
*/
get_template_part( 'loop', 'tag' );
?>
</div><!-- #content -->
</div><!-- #container -->