From 65aac68cd64111a42f370569662cbebcc13279eb Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sun, 2 May 2010 21:28:11 +0000 Subject: [PATCH] Fix custom WP_Queries when using page_on_front. Props aaroncampbell. See #12391 (Which caused it), Fixes #12047 git-svn-id: https://develop.svn.wordpress.org/trunk@14341 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index e5e06100e3..00107d1f8f 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1475,15 +1475,9 @@ class WP_Query { // Correct is_* for page_on_front and page_for_posts if ( $this->is_home && - 'page' == get_option('show_on_front') && - get_option('page_on_front') && - ( - empty($this->query) || - !empty($qv['preview']) || - !empty($qv['cpage']) || - !empty($qv['page']) || - !empty($qv['paged']) - ) ) { + 'page' == get_option('show_on_front') && get_option('page_on_front') && + ( empty($query) || !array_diff( array_keys($this->query), array('preview', 'page', 'paged', 'cpage') ) ) + ) { $this->is_page = true; $this->is_home = false; $qv['page_id'] = get_option('page_on_front');