Make WordPress Core

Changeset 13944


Ignore:
Timestamp:
04/02/2010 08:16:20 AM (15 years ago)
Author:
dd32
Message:

Don't prevent 404'ing on tax/author pages when a paged page is requested which doesnt contain posts. For example, /category/animal/page/9999999/. Allows for /category/empty_cat/ to not 404. Fixes #11857

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r13854 r13944  
    477477        if ( ( 0 == count( $wp_query->posts ) ) && !is_404() && !is_robots() && !is_search() && !is_home() ) {
    478478            // Don't 404 for these queries if they matched an object.
    479             if ( ( is_tag() || is_category() || is_tax() || is_author() ) && $wp_query->get_queried_object() ) {
     479            if ( ( is_tag() || is_category() || is_tax() || is_author() ) && $wp_query->get_queried_object() && !is_paged() ) {
    480480                if ( !is_404() )
    481481                    status_header( 200 );
Note: See TracChangeset for help on using the changeset viewer.