As documented, if you’re using post__in
to query a specific list of posts and what the results returned int he same order you need to set orderby
to post__in
:
$args = array(
'posts_per_page' => 8,
'post__in' => $kiemeltek,
'orderby' => 'post__in',
);
Related Posts:
- Resetting post data to previous loop in nested loops
- Pagination returns 404 after page 20
- Make loop display posts by alphabetical order
- WP_Query: query posts by ids from array?
- get custom post type by tag
- pre_get_posts with get_posts
- Query Custom Meta Value with Increment
- Group posts by custom field
- Transient pagination not working properly
- get_posts() seemingly ignoring post_type
- Woocommerce custom loop to show all the products [closed]
- How to bring specific post to front of wordpress loop?
- How to show the posts of some category first, and then all other
- Why execute the_post()?
- Pagination stops at page 6
- Paginated HTML Sitemap
- Posts loop with pagination on a single post page
- Why does the_content not work like others for a set post id?
- WP_Query Order by Specific Post ID First
- How to limit total number of posts in wp query loop?
- Using one WP_Query object within the loop of another WP_Query object
- Pagination is broken and I need help fixing it
- How to display 7 most recent days of posts?
- How to vary post loop results layout and resume?
- Create A Loop With A Variable Number of Posts For Each Bootstrap Row?
- Get a post from other loop each n-posts in the main loop
- Loop returning only 1 result
- WordPress Loop and $post
- posts_per_page not working for first page of pagination
- Excluding pages in WP_query using ACF
- reset to main loop doesnt work
- Some doubts about how the main query and the custom query works in this custom theme?
- Search form not working with custom query?
- Post loop for all taxonomy terms
- Stuck in the query loop
- Only display post if published in last 24 hours?
- How to remove the most recent post from $the_query
- WP_Query loop else statement not executing
- How do I rewrite this loop as a new WP_Query style-loop?
- Include current post into loop
- How to display the featured image for each post?
- Check for the main query from the template
- Trying to retrieve random post, getting a page
- How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]
- has_excerpt() not working inside wp_query
- Save (and exclude) posts from loop to use in another loop on page
- Get all posts with empty meta_value
- Loop 3 posts column wise and continue the loop into same columns
- PHP – Loop custom post type categories within jQuery Tabs
- Check if a post has term inside loop
- How to Order By Two Custom Fields?
- Display specific page (that is child) content on parent page
- Ordering posts by custom field and grouped by month
- Query Taxonomy By Page Title
- relation OR instead of AND – Filtered term ID’s in loop
- How to change the default post type over the loop?
- Query Not working as expected
- Compare “Main” post ID to ID inside wp_query loop
- Paginate pages with dynamic query
- WP_Query loop doen’t work with my custom taxonomy
- Determine if ID is page or post and query the ID
- problem with the loop
- get_children() Archive Template
- Function the_posts_pagination() not compatible with WP_Query arguments
- Populate select list with meta values from all posts of a Custom Post Type
- show most viewed post
- Bootstrap grid while loop
- How to show specify category template for both parent and child category
- Woocommerce featured products query no longer working
- How can I use WP_Query to sort ‘event’ custom post type by date?
- Display posts side by side with custom query
- WordPress For Loop Prints Unwanted Extra Paragraph Element
- query all posts published by certain user id
- modifying the loop multiple times with arguments passed through ajax to wp_query
- WP_Query causing links to not work
- Some doubts about how the main query and the custom query works in this custom theme?
- Pagination returns 404 after page 20
- Ordering Posts by parent category, name ascending
- WP_Query a custom field value bringing back 0 results
- Set Transient on CPT
- Iterate through ID’s in loop
- Load 3 posts in flexslider slide [closed]
- Issue with WP_Query (need a array of selected ID’s)
- An archive page without post format (just standard post)
- Multiple wp_query loops showing first 5 posts on all pages instead of older posts[Resolved]
- How to exclude posts ordered by comment_count from subsequent wordpress loops using WP_Query?
- meta_query dates from an array
- Creating array to compare custom field values
- Pull Instagram images into an existing loop?
- $query conflicting with other queries in the same page
- WordPress Post Looping? [duplicate]
- Remove 5 latest posts from the loop
- Exclude post formats in custom loop
- Show linked products using wp query and woocommerce
- Standard Loop – wp_query
- First post outside of loop, homepage only?
- Custom Wp_query loop takes very long
- Prevent WordPress loop from displaying similar post titles
- Show number of posts AND number on current page (cannot make it work)
- WP_query shortcode inside acf Repeater breaks the repeater loop