'orderby' => 'post__in',
'post__in' => array(5,6,3,8),
You need ACF to pass the ID’s in order but that should do it.
Related Posts:
- can’t get query to order posts by acf datepicker
- Order posts by custom field DATE value
- How to List Events by Year and Month Using Advanced Custom Fields?
- wordpress query – orderby child post date
- Compare two numeric custom fields
- Advanced Custom Fields – Query Efficiency
- Query by one meta_key and sort by another (possibly NULL value)
- Filter query posts by the count of metas for a meta key
- mySQL query. ORDER BY meta_key
- Order query by post meta value
- Ordering by a metadata subfield in WordPress?
- Order RSS content by an advanced custom field value
- Order by title – but now built in wordpress func, sort the_title
- Get the_field of Advanced Custom Fields in a custom query [closed]
- Querying with WP query using meta key price
- Advanced Custom Fields – Relationship post foreach query
- How to manage a particular “order by” for get_search_query()?
- Order terms by count – missing terms
- Querying Advanced Custom Fields
- How can I get the name of term post meta value which equals term id
- Exclude in get_pages() based on meta field
- JetEngine Query Builder – order by value from repeater
- Order posts ascending from posts in array
- WordPress query: merge meta key (number) values and sort
- Order WordPress Query by Custom Field While Still Using Tax_query Argument
- “order” does not affect order of custom query
- Query Posts that have or don’t have a meta_value and order by the same ASC
- Advanced Custom Fields Query with Different Values of the Same Key
- Apply ordering args to newly merged queried
- WP_Query orderby meta key/value suddely stopped working
- Modify a query using both a text field and a true/false AFC field
- Ascending & descending posts on same page with IF statement
- Order get_terms using a Custom Field
- Get all image from single page using this query
- Add multiple value to a query variable in WordPress
- wp_dropdown_categories with multiple select
- How to tune search argument in WP_Query to show only exactly the same results?
- Order posts by tags count?
- How to get my loop to pull posts into three columns
- Custom $wpdb Query for Custom Post Type by Category
- Can’t pass table to $wpdb->prepare
- Date query year and month OR just year
- Are database queries created using WordPress filters protected from SQL injection?
- get post id using the $query_vars variable
- Is there a conditional tag for latest post or do i need a query?
- get_posts() loop returns the same the_title() for each post
- How to check current user in meta value array in WP_Query meta_query
- How select a specific query when setting offset?
- Change media attachment author via mysql query
- How do I use get_query_var() within plguin code
- Temporarily storing main search result
- Help with MySQL to $WPDB query
- Order by summing multiple values
- sql select query in wordpress ‘page’ [closed]
- wpdb->term_taxonomy count posts from both published and private posts?
- Group custom post listing in admin section
- Alter main archive, to show posts with meta as last
- problem with sql query in wordpress plugin
- Attempt to improve WP search, can someone check my SQL query?
- WordPress Query orderby title with UTF8 string in title
- Searching With Apostrophe
- List author’s posts with SQL
- Where is the query in wp-login.php
- Order posts by recent comments
- query if page has not child
- get_posts showing only 5 posts. (nopaging and posts_per_page -1 not working)
- Display posts between two particular dates
- pre saved posts query from db options table
- Order posts by date, but also give priority for a specific term
- $post->ID not working in combination with a custom query
- Custom Query returns array, but I can’t see it’s elements
- How to insert Collate into WordPress search query?
- Combine “Exclude” Query in functions.php
- Optimize slow SQL query for multiple meta values
- prepare function sql safe method
- Wrap/close ‘query’ for a first-letter ordered listing of posts
- wpdb query with dynamic column name?
- How do you display the number of a post in a query?
- How to return count of custom post type posts with a specific custom field value via $wpdb?
- Help with Related Posts Function
- Trying to use WP_Query to return post with and without meta values
- Changing WordPress sort order for returned child pages
- get products by custom date variable
- How to delete all images from code in all post_content
- How to sort by two meta keys in admin area?
- Meta query orderby meta_value_num sorting by role first
- Multiple orderby date arguments
- Restrict WordPress search to a single ACF field
- How to hide sub fields in a field group and also the entire field group if the answer selected is “no”
- OR condition not working
- Query not returning child posts for any parent post ID
- Use $wpdb->get_results with filter based on array
- Add Hook for clearing transient when post is added
- Show links to child pages on both parent AND child pages
- Modify Global Posts Plugin
- How to reference same column name but different table in custom db query
- Retrieving custom field array value through db query
- Allow admin to determine the order of queries?
- SQL Query : how copy all tags of post into their post content in wordpress by sql query
- How to show sticky posts on all pages of the pagination, not just the first page?