Don't 404 for empty post type archives. props markmcwilliams, jfarthing84, fixes #17316.
git-svn-id: https://develop.svn.wordpress.org/trunk@18192 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
15f0c9a2f0
commit
1df1e7f1b5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user