WordPress.org

Make WordPress Core

Changeset 9226


Ignore:
Timestamp:
10/17/08 17:00:57 (6 years ago)
Author:
ryan
Message:

Better not found messages. Props caesarsgrunt. fixes #5324

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/default/archive.php

    r8999 r9226  
    5454            <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div> 
    5555        </div> 
     56    <?php else : 
    5657 
    57     <?php else : ?> 
     58        if (is_category()) // If this is a category archive 
     59            printf("<h2 class='center'>Sorry, but there aren't any posts in the %s category yet.</h2>", single_cat_title('',false)); 
     60        else if (is_date()) // If this is a date archive 
     61            echo("<h2>Sorry, but there aren't any posts with this date.</h2>"); 
     62        else if (is_author()) // If this is a category archive 
     63            printf("<h2 class='center'>Sorry, but there aren't any posts by %s yet.</h2>", get_userdatabylogin(get_query_var('author_name'))->display_name); 
     64        else 
     65            echo("<h2 class='center'>No posts found.</h2>"); 
     66        include (TEMPLATEPATH . '/searchform.php'); 
    5867 
    59         <h2 class="center">Not Found</h2> 
    60         <?php include (TEMPLATEPATH . '/searchform.php'); ?> 
    61  
    62     <?php endif; ?> 
     68    endif; 
     69?> 
    6370 
    6471    </div> 
Note: See TracChangeset for help on using the changeset viewer.