diff --git a/wp-includes/query.php b/wp-includes/query.php index 9a3ad3c69..81601aac9 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1822,7 +1822,7 @@ class WP_Query { unset($ptype_obj); } - if ( '' != $q['name'] && !$q['p'] ) { + if ( '' != $q['name'] ) { $q['name'] = sanitize_title_for_query( $q['name'] ); $where .= " AND $wpdb->posts.post_name = '" . $q['name'] . "'"; } elseif ( '' != $q['pagename'] ) {