Make WordPress Core

Changeset 13218


Ignore:
Timestamp:
02/19/2010 10:41:15 AM (15 years ago)
Author:
dd32
Message:

Remove Unneeded the_post/rewind_posts() calls, Add a "No posts for this archive" type message to the loop. See #9015

Location:
trunk/wp-content/themes/twentyten
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/category.php

    r13146 r13218  
    44            <div id="content">
    55
    6 <?php the_post(); ?>
    7 
    86                <h1 class="page-title"><?php _e( 'Category Archives:', 'twentyten' ); ?> <span><?php single_cat_title(); ?></span></span></h1>
    97                <?php $categorydesc = category_description(); if ( !empty($categorydesc) ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>' ); ?>
    10 
    11 <?php rewind_posts(); ?>
    128
    139<?php get_generic_template( 'loop', 'category' ); ?>
  • trunk/wp-content/themes/twentyten/loop.php

    r13181 r13218  
    55    </div><!-- #nav-above -->
    66<?php } ?>
     7
     8<?php if ( ! have_posts() ) : ?>
     9    <div id="post-0" class="post error404 not-found">
     10        <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1>
     11        <div class="entry-content">
     12            <p><?php _e( 'Apologies, but no results were found for the requested Archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p>
     13            <?php get_search_form(); ?>
     14        </div><!-- .entry-content -->
     15    </div><!-- #post-0 -->
     16<?php endif; ?>
    717
    818<?php while ( have_posts() ) : the_post(); ?>
Note: See TracChangeset for help on using the changeset viewer.