From b20d93c69c6e648ce6009e30394c1bf8a4829427 Mon Sep 17 00:00:00 2001 From: scribu Date: Mon, 15 Nov 2010 13:33:16 +0000 Subject: [PATCH] Ignore 'name' qv if 'p' qv is set. Fixes #15433 git-svn-id: http://svn.automattic.com/wordpress/trunk@16384 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 81601aac9..9a3ad3c69 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1822,7 +1822,7 @@ class WP_Query { unset($ptype_obj); } - if ( '' != $q['name'] ) { + if ( '' != $q['name'] && !$q['p'] ) { $q['name'] = sanitize_title_for_query( $q['name'] ); $where .= " AND $wpdb->posts.post_name = '" . $q['name'] . "'"; } elseif ( '' != $q['pagename'] ) {