Skip main posts query if 404. Props misterbisson. fixes #5717

git-svn-id: https://develop.svn.wordpress.org/trunk@6940 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-02-20 16:52:40 +00:00
parent c088813775
commit 8ddbf1eb16
1 changed files with 4 additions and 0 deletions

View File

@ -269,6 +269,10 @@ class WP {
function query_posts() {
global $wp_the_query;
$this->build_query_string();
if( $this->did_permalink && $this->query_vars['error'] == '404' ){
$wp_the_query->parse_query($query);
return;
}
$wp_the_query->query($this->query_vars);
}