setup_postdata will let you use loop functions with post results via get_posts.
another option is to use the various filters available to alter WP_Query‘s behavior- posts_join, posts_where, posts_orderby.
Related Posts:
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- Display products from specific category in shop page
- Exclude post on loop by multiple meta key value
- How to change a custom query into a standard loop?
- How to query ‘posts_per_page’ to display a different blog posts index template?
- How to count data records in wordpress which have same meta_value in wp_postmeta table?
- Query sticky posts with thumbnails
- WP_Query on custom field and order results
- Any number in meta key (wp query)
- Filtering posts from different categories into different section by doing WP_Query only once
- WordPress query with items from more than one selfdefined taxonomy as `term` argument
- Query most popular terms by taxonomy over 2 week period
- Custom taxonomy.php not working
- Array as ‘key’ in WP_Query
- How to provide meta_key array to wp_query?
- Wp_query with 2 meta keys and array of meta values
- Meta query compare for ID’s greater than specific ID
- WP_Query not returning correct result with meta_query parameter
- show most viewed post
- Meta Query if Values Don’t Exist
- Custom query (author is post_author or meta co_author) with Pagenavi pagination
- Output ACF field dynamicaly within a taxonomy loop [closed]
- get_post_meta bringing back results, but $wpdb->postmeta doesn’t
- Pagination with custom SQL query
- How to list some posts first in the loop based on post id
- Add indexing to meta_value in wp_postmeta
- Custom WP_Query order by post_meta and (author) user_meta
- WordPress Custom Query to show posts from last x years
- How to order posts tag by tag?
- Pagination with 5 posts per page
- Perform query with meta_value date
- Custom archive page based on array of categories and tags
- How can I connect to another WP database and use WP_Query?
- datetime picker, timestamps and meta queries
- Compare two meta-fields in a wp_query (where meta-field-A is larger than meta-field-B)
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- Splitting the main query in multiple loops with query_posts and/or pre_get_posts?
- Order WP Query posts by custom order calculated from post meta values
- how to speed up a complex wp_query?
- How to query for custom field within Gutenberg block from outside of that post? [closed]
- WP_Query doesn’t get sticky post at the top, when used in a page template
- Meta Query for specific months
- Meta query with JSON value
- Prevent duplicate post from dynamic multiple loops
- Get meta info related to current post
- if/else on custom query gives 200 OK when condition not met?
- Creating arguments from loop for WP_Query meta_query
- Select from wp_post and multiple meta_value from wp_postmeta
- Multiple Loops Inside a Function
- Sticky posts are not showing at the top of category posts
- ACF Date Based wp_query
- Using meta_query with multiple keys and compare values
- Can I set my WP_Query to be a Main Query?
- Mysql query and order meta value
- Group and list posts by custom taxonomy
- Show scheduled posts in main loop but not in WP_Query?
- meta_query BETWEEN, but the range is stored in the custom field
- Is it possible to set specific posts to show first in a query?
- Order ascending is ignored in meta query?
- How to get list of posts from permalinks?
- different for loop if screen resolution < 1000px
- Ajax future single post query doesn’t work when NOT logged in
- Conditional sorting with variable using WP Query
- Advanced WP_Query with meta_query, orderby?
- sort and display posts by custom field (wp-query and the loop))
- Issues with search after added meta_query
- WP_Query: apply an SQL function to meta fileld value
- How to search for meta_query LIKE or tax_query LIKE and grab these posts on search results?
- How to create dynamic value in WP_Query meta_query
- query post by author gender
- Filtering by multiple conditions in the loop
- How to access $wp_query object from array of posts given by get_posts?
- Display all attached image of every post of custom post type and link to original post
- How do I add an item to the WP admin menu?
- Multiple meta query from array
- WP_Query with 4 post meta field arguments gives 500 internal server error
- WordPress Queries Not Working?
- Filter subpages in while loop from WP Query object
- What’s missing in this wp_query and meta_query
- duplicated posts when using pagination
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- Trouble with serialized metadata
- meta_query order by date present -> future then show null
- display the children of the post using the current page as the main parent
- Display 3 levels of categories on page
- Custom post type loop error: Trying to get property of non-object
- In Product Category archives how to show Posts having same/similar prod_cat slug structure?
- How to make a wordpress loop file that displays posts based on certain conditions
- WP_Query with MetaQuery issue
- How do I display posts with specific value in a custom field into my loop?
- Orderby Meta Value and Query from Meta Query
- The sorting of posts by a meta_query with two keys fails while separated as single queries it works
- Order by multiple meta keys on wordpress
- Sort posts in dashboard using custom field; also include posts where field isn’t set
- Display First posts without the default featured image
- WP_Query with several meta_query-statements and order by meta_value
- wpdb LIKE request shows all database data
- How do I split a large query with a semi-expensive function included into multiple smaller queries
- Query All Posts: Either Display Most Recent or One with Particular ACF Value Chosen
- Display only posts with thumbnails