Since you are using 'post__in'
in the 'orderby'
parameter, the 'order'
parameter will have no effect, however, you can simply reverse the array you are passing to 'post__in'
:
$args = array(
'post_type' => 'etlap',
'posts_per_page' => 5,
'post__in' => array_reverse($ids),
'post_status' => 'any',
'orderby' => 'post__in'
);
Related Posts:
- orderby not working for query_posts using array of IDs
- Order by & include array by specific post ids
- How to return results of a get_posts() in explicitly defined order
- Is it better practice to use query_posts, WP_Query, or get_posts to create various custom loops within a Page?
- query_posts doesn’t order by title
- how could I get the pagination as I want to when query posts using get_posts function
- Post count per (day/month/year) since blog began
- How to get 4 Posts after the 5 most recent ones
- Order by meta_key with two meta_queries
- Ordering terms before displaying posts
- How can I pick a single post from the latest 3?
- making random query button using $_GET
- orderby:date not working
- how to exclude “featured” posts from the main loop?
- WordPress query_posts and orderby page order
- tax_query operator woes
- Show Only Posts Owned By Logged In User + my post
- Order posts by condition
- order posts by meta value on posts page
- WordPress pagination with get_posts?
- Weird orderby => post__in issue
- Sorting a query Field by date
- define orderby URL with meta_key=post_views_count
- My post repeats itself on the second page [closed]
- post_parent array doesn’t work
- While loop articles – if statement order
- get_the_title outputs title until spacing; it does not get full length of title
- how to store wordpress loop in array?
- Multiple posts/pages in one page?
- Posts being viewed
- Querying a query
- Ordering of posts, 2020 Year showing as next event when should be last
- allow user to edit posts made by others users based on the user role
- Order posts by ACF checkbox
- Post per page not working
- Adding Category Argument into an Array for WordPress Query
- query_posts works while get_posts doesn’t
- How do I find the first item in the post array?
- When to use WP_query(), query_posts() and pre_get_posts
- how to query posts by category and tag?
- How do I query by post format in WordPress 3.1
- How to set posts per page using WP_Query()
- Limit the post for differents custom post type in the same wp_query
- Custom Post Type “Event”: chronological list of recurring events
- Order by meta value, pro first, then free
- How to create an attachments archive with working pagination?
- Modify theme to get page excerpts on front page
- Counter code for paginated category pages in wordpress
- Author List page: Exclude based on last post date
- Replace query_posts with pre_get_posts
- query_posts sort in multiple directions
- Filter query_posts by tag slug on “Tag Archive” page (when tag is 2 or more words)
- Warning: urlencode() expects parameter 1 to be string, array given in and not getting the preffered output
- Using database meta_values to calculate new post order using pre_get_posts or a ‘request’ hook
- Serialized array, grab specific posts with meta_key/meta_value[0]->is_featured
- exclude ids through post__not_in
- Display custom post types with custom date field value (before today) & order by custom date field
- Integrating post archive wtih another source and preserving date ordering
- Can I set and show “important” post in my blog?
- Order posts using a custom array
- AJAX pagination offset returns same post on adjacent pages
- Custom MySQL Query with logic
- trouble with query to fetch next and previous posts
- show first 3 thumbnails of posts in different sizes [closed]
- Simple custom post query for all the posts or many of them not working
- Hook to return true when the_post() is used in a custom while loop
- How to remove a plugin filter’s priority on specific loops (custom queries)?
- Query all posts if multiple meta key don’t exist
- Proper syntax to add boolean in array()
- using query_posts to pull posts out of a category in a while loop. Getting odd echo
- Echo a numerical value in query_posts
- why to use query_posts() in custom page?
- Query posts to get all but the most recent post
- Always using the same ARRAY on different querys
- Include current post into loop
- Turn get_posts as string into an array for use in theme admin options
- How do I use pagination in WordPress?
- Querying multiple values from a single key
- Does WordPress run a post query when a page is invoked?
- query_posts with meta_value
- How exclude 3 latest posts of a category in query_posts
- Yet another get_posts() in explicitly defined order problem
- Weird problem on if statement
- Issue with sidebar widgets not showing when I do custom queries
- Why would post_type be ignored in this query?
- query_posts call sets is_home() to true
- Script that gets the first tag of post and query all other posts with the same tag
- Trouble highlighting correct menu parent with wp_nav_menu classes while viewing “single posts”
- Latest 5 post excerpts from 5 different authors in Sidebar
- Facing problem with tax_query results
- Help with query_posts function
- custom post type get_posts() function not work
- WP_User_Query Orderby Not Working
- Help ordering custom query by Title, Ascending
- Pulling posts tagged with similar title name
- Ordering custom post type by custom field without a title
- get_posts and wp_autop (remove filter)
- Including post data in a sidebar occurring outside of and before the Loop
- show custom post’s post in two different divs [duplicate]
- new WP_Query with order args – no more distinction between categories