diff --git a/wp-includes/query.php b/wp-includes/query.php index 7199c9c503..c2421cd369 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2372,11 +2372,11 @@ class WP_Query { if ( !$ptype_obj || !$ptype_obj->query_var || empty($q[ $ptype_obj->query_var ]) ) continue; - if ( ! $ptype_obj->hierarchical || strpos($q[ $ptype_obj->query_var ], '/') === false ) { - // Non-hierarchical post_types & parent-level-hierarchical post_types can directly use 'name' + if ( ! $ptype_obj->hierarchical ) { + // Non-hierarchical post types can directly use 'name'. $q['name'] = $q[ $ptype_obj->query_var ]; } else { - // Hierarchical post_types will operate through the + // Hierarchical post types will operate through 'pagename'. $q['pagename'] = $q[ $ptype_obj->query_var ]; $q['name'] = ''; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 6afbda651d..0f3702d995 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.0-alpha-20140622'; +$wp_version = '4.0-alpha-20140623'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.