id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 33065,Allow for querying by `post_name__in`,dd32,boonebgorges,"When implementing WP_Query with external data-sources, I'm finding a common theme to being wanting to query by a selection of post slugs retrieved from an external system. WordPress currently utilises `post_id__in` for sticky posts, and some plugins use the same query var. However, when you're integrating with another system which doesn't use WordPress post id's, the post slug is the most obvious field to use as the shared key. For example, I'd love to be able to do this query: {{{ $query = new WP_Query( 'post_type' => 'post', 'post_name__in' => array( 'sample-post', 'my-post', 'secret-projects' ), 'meta_query' => array( ... ), 'tax_query' => array( ... ), 'date_query' => array( ... ), ); }}} Right now, there's three main workarounds 1. Store post ID's along side the post_name 2. Retrieve all post ID's for the slugs, then pass those in as `post_id__in` 3. Using the `posts_clauses` filter to add a `AND post_name IN(...)` where clause.",enhancement,closed,normal,4.4,Query,,normal,fixed,has-patch 4.4-early,,