id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 28017,Slug conflict with hierarchical Custom Post Types,internetrnd,,"To Replicate, create a '''hierarchical ''' custom post type and make sure it has support for page attributes, lets call it ""items"" Publish 3 ""items"" posts with the following slug and content ( IN THIS ORDER! ) Post 1: Slug - samsung , No Parent , content : ""Welcome to Samsung"" Post 2: Slug - cell-phones , No Parent , content : ""Welcome to cell phones"" Post 3: Slug - samsung , Parent: cell-phones , content : ""Welcome to cell phones by Samsung"" Navigate to http://localhost/items/samsung/ , You will see the content for Post 3. The correct content should be from Post 1. http://localhost/items/cell-phones/samsung/ works just fine. To get the correct results: Modify wp-includes/query.php , line 2340: {{{ // ORIGINAL LINE if ( ! $ptype_obj->hierarchical || strpos($q[ $ptype_obj->query_var ], '/') === false ) { // MODIFIED LINE if ( ! $ptype_obj->hierarchical ) { }}} ",defect (bug),new,normal,,"Posts, Post Types",3.9,normal,,needs-patch,,