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

git-svn-id: http://svn.automattic.com/wordpress/trunk@18192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-06-08 16:07:38 +00:00
parent 3733f6a835
commit 5cc93d8dc4
1 changed files with 1 additions and 1 deletions

View File

@ -470,7 +470,7 @@ class WP {
if ( !is_admin() && ( 0 == count( $wp_query->posts ) ) && !is_404() && !is_robots() && !is_search() && !is_home() ) {
// Don't 404 for these queries if they matched an object.
if ( ( is_tag() || is_category() || is_tax() || is_author() ) && $wp_query->get_queried_object() && !is_paged() ) {
if ( ( is_tag() || is_category() || is_tax() || is_author() || is_post_type_archive() ) && $wp_query->get_queried_object() && !is_paged() ) {
if ( !is_404() )
status_header( 200 );
return;