X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/4f9d63e13cd8c6e275797c75b401b074b82937bc..c8946fda799b75451b0bee19b48736a13433a7e3:/wp-includes/query.php diff --git a/wp-includes/query.php b/wp-includes/query.php index cf3cc1e2..3a8c1e9b 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2738,7 +2738,8 @@ class WP_Query { $this->queried_object = $term; $this->queried_object_id = $term->term_id; } elseif ( $this->is_posts_page ) { - $this->queried_object = & get_page(get_option('page_for_posts')); + $page_for_posts = get_option('page_for_posts'); + $this->queried_object = & get_page( $page_for_posts ); $this->queried_object_id = (int) $this->queried_object->ID; } elseif ( $this->is_single && !is_null($this->post) ) { $this->queried_object = $this->post;