POST does not have parents, but categories. Only PAGE can have parent. So, the question is, what do you want to get?
In case of getting POSTS from different categories, just use get_posts and add multiple categories.
As for pages, just use get_page_children.
Related Posts:
- Nested meta_query with multiple relation keys
- numberposts? showposts? posts_per_page?
- Exclude Child Posts from WP_Query
- How can I save an array from a random post sequence for later use?
- All-in-One Event Calendar: Custom Query – Getting each event Instance [closed]
- Is there an action/filter called when WP_Query->query is finished and assigns posts
- Limit search results to exact match
- Highlighting Sub topic in a post?
- Pagination Not working on Home Page with 2 Query
- Multiple keyword search
- Get number of comments after modifying comment query
- Show default content if custom WP_Query has no posts
- List the 5 most recent child pages
- Include Sticky Posts with Custom Query
- $wpdb->insert inserting two rows in database
- Create unique page without header.php for json feed
- Set order of returned items in the WP_Query() class/function
- Sub-loop / nested loops Best Practices
- How to loop for every result found in the_content() when using the search query?
- Is there any advantage of using default WordPress Search instead of creating a custom one?
- Order By table field comment_status in WordPress > 4.0
- Clean up WordPress code that repeats
- How to optimize multiple WP_Query() calls on one page?
- Use post object from first query in second query
- Query to get siblings and parent page
- How to list custom fields as headers and list all pages sharing that custom field under it?
- Cutom wp_query for geolocation search, pagination not working
- Include data from custom table in WP_Query
- echo a specific meta_key queried through a custom post
- WP Group posts by year(desc) > month(desc) > date(asc)
- Better wordpress attachment query than this
- How to order posts on each different category?
- Get specific ACF key and value from all posts – no access to DB
- Orderby two meta fields not working
- Custom wp_query – I’m getting ‘all’ post, not the specific post in the query
- Don’t repeat posts from children in parent taxonomy query
- meta_query with array as value with multiple arrays
- Adding pagination to sub-wp_query within a singular post page
- Magazine style frontpage with multiple categories/loops and no duplicate posts
- How can I build a query that returns all attachments of a page and it’s children pages?
- Prioritising and Ordering Posts By Category Name Using A Custom Loop
- Where is this query?
- How to use wp query in my custom page without including header and footer in wordpress
- Custom order revolution sliders post base slides as inserted in Specific Posts List field
- WP Query for all events prior to current date
- How to extend WP_query to a specific table?
- Display the search results like the original pages
- Multi line of $wpdb->query just run 1 time and end the loop right after
- Add to search posts query array with post IDS which will appear first
- Woocomerce – Order products by float attribute in archive pages
- Multiple values in WP_Query : category__and
- How to set up pagination for a custom loop on a global template (author.php, tag.php, archive.php?)
- WP_Query doesn’t works inside loop
- Custom query using WP_Query is not working
- Limit the number of posts from a specific category on index.php
- Get the type of an advanced custom field (ACF) in a WP_Query loop [closed]
- Switched from query_posts to wp_query, pagination no longer working
- WP_Query breaks pagination
- Pagination problem with multiple loops on the same page
- shortcode with $atts with strange results
- query only direct child and sub-terms of a current term archive
- I need to get all categories from a WP_Query
- $wp_query->found_posts; returns zero
- Rewrite URL custom search query
- How could i add username field in WooCommerce
- WP_Comment_Query pagination, delving into the unknown
- Getting all user metadata from user
- Limit WP_Query to only X results (total, not per page)
- How to disable main query?
- Use post__in and post__not_in together?
- Compile two queries to one set of results?
- How to retrieve current page WP_Query arguments?
- How to use filter hook “the_posts” with a function that refers to $this?
- add_actions called from functions.php not returning good values
- Multiple Search Terms WP_Query
- Show posts from a custom taxonomy on a page
- Should wp_query automatic meta and term cache priming be used in an enviroment with an object caching
- wp_query with custom post type only returning last posted
- Display custom tags on pages that have a specific page parent
- Limiting number of related posts
- how would i change post->ID to work correctly when querying pages?
- Pagination works in custom query loop but it doesn’t work in shortcode
- Event with multiple dates, display events chronologically
- WP_Query to get post on frontpage
- How to SQL query posts IDs by categories AND authors?
- How can I use arrays and a foreach to generate many lists with WP_Query?
- Apply a custom WP_Query to the whole multisite network
- WordPress Query for CPT that only shows posts within radius of current user’s geolocation
- How to get user avatar via WPDB
- One of two similar WP Query is very slow
- Complex Meta Query
- WordPress conflict with multiple load more posts functions on click
- why default wordpress loop not working outside index.php
- Create custom order sortby based on array of id
- How to combine nested tax_query logic with other nested query logic?
- complex query question
- Can’t get pagination to work with this WP_Query loop
- Passing additional variables to a query
- How can I filter a query by post id?
- WP_Query equivalent of SQL UNION ALL