Make WordPress Core

Changeset 18192


Ignore:
Timestamp:
06/08/2011 04:07:38 PM (13 years ago)
Author:
nacin
Message:

Don't 404 for empty post type archives. props markmcwilliams, jfarthing84, fixes #17316.

File:
1 edited

Legend:

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

    r17771 r18192  
    471471        if ( !is_admin() && ( 0 == count( $wp_query->posts ) ) && !is_404() && !is_robots() && !is_search() && !is_home() ) {
    472472            // Don't 404 for these queries if they matched an object.
    473             if ( ( is_tag() || is_category() || is_tax() || is_author() ) && $wp_query->get_queried_object() && !is_paged() ) {
     473            if ( ( is_tag() || is_category() || is_tax() || is_author() || is_post_type_archive() ) && $wp_query->get_queried_object() && !is_paged() ) {
    474474                if ( !is_404() )
    475475                    status_header( 200 );
Note: See TracChangeset for help on using the changeset viewer.