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

git-svn-id: http://svn.automattic.com/wordpress/trunk@6940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-02-20 16:52:40 +00:00
parent 4bbe72cd41
commit 321845ffcd
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);
}