If you don’t specify the order
and orderby
arguments with your query, the results will be ordered ascending by date, no matter what order you put the pages in with post__in
. If you have an order in mind that isn’t covered by one of the regular orderby
arguments, you’ll have to define a metavalue on the pages to store the desired order.
Related Posts:
- Page template query with WP_Query
- How to display page content in a page template?
- Does WordPress generate an automatic page for post formats?
- Single page theme that uses pages for the content
- Trying to list out child pages with WP_Query
- Order by menu structure
- Targeting specific pages in the loop
- What are the differences between “Latest Posts” and “Static Page”?
- WP_Query not retrieving by random order under parent
- Set if condition with wp_nav_menu
- Set order of returned items in the WP_Query() class/function
- Search pages that are a child of the current page
- How to display summary content from a Page (Not a Post) on another page
- Serve specific “template” page at any URL that ends in its slug
- Display custom tags on pages that have a specific page parent
- Is there a reason why Pages are not publicly_queryable?
- Why post__not_in is ignored?
- Exclude parent with child pages from WP_Query
- Create a loop on my pages with new “WP_Query”
- All blog data on a page using custom query gives 404 for page 2 and onward
- When listing child pages run out of memory
- WP_Query with multiple orderby NOT working with ASC and DESC, what’s wrong?
- Display specific page (that is child) content on parent page
- Get query results with a page title
- How to get current page nearest parent id?
- How to get main menu only with wp_nav_menu
- Unable to paginate a custom page query
- How to create single page site in WordPress
- Determine if ID is page or post and query the ID
- How to query for a page, get data, then query for child pages of that page
- Get list of all Grandchild Pages
- Custom query does not find pages
- How to get pages of parent (non-recursive)?
- WP Query and multiple pages
- How to use custom page for all posts with custom url, call another directory?
- display the children of the post using the current page as the main parent
- pages shortcode filtering by category
- How to create page that lists tags by initial letter?
- Get a page ancestor from a most viewed list
- How can I use a specific wordpress page template if certain words are used in page title [closed]
- Category Archive not working for pages
- Retrieving category pages from subcategory returns empty sets
- Issue in If else condition [closed]
- Show parent’s child and also child’s, child on a page?
- get contents and permalink from a specified page
- Hierarchical List Pages as a table
- Get next post when using pagination with WP_Query?
- WordPress pagination returns the same posts
- How to write short code with if else to get page_id?
- How to make WP_Query ‘post__in’ accept an array?
- Is it possible to orderby multiple meta_keys when using meta_value_num?
- Merging multiple wp_query objects
- Query causing load because of SQL_CALC_FOUND_ROWS post counting?
- Using custom meta_query with relation not working as expected
- Nested query inside Logical operator OR not working in meta_query
- SQL Statement generated by WP_Query not producing expected results
- Only show first post to match certain criteria within WP_Query
- What is an efficient way to query based on post_meta?
- How to order a post type with meta_value_num and if meta_value_num does not exist then order by date
- Pagination wont work with search results template [duplicate]
- difference between $wp_the_query and $wp_query? & getting the values properly [duplicate]
- Custom Field sort not working (WP 3.8.1)
- Get post ID’s from one query and exclude from another
- WordPress Query is taking more then 20 second and stuck on creating index
- Modifying raw $_POST data early in the lifecycle
- Get the Plugin Which Triggered a MySql Query in WordPress?
- Difficulty with rewrite rules
- Show selected images on top in Media Manager
- Complex date range with WP_Query and BETWEEN
- showing all search result in one template
- List custom taxonomy terms sharing posts with a term from a second custom taxonomy
- Ajax WP_Query reutrns no results on author.php
- Large AND OR query timing out
- WP_query wp_posts_counts returns only count of admin and not users
- Categorising search results based on Custom Fields
- How to query for all posts that have a particular meta key?
- Custom taxonomy.php not working
- 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?
- WP_Query Taxonomy categories filtering
- Assign a minimum result count for WooCommerce query shortcodes?
- How to search for meta_query LIKE or tax_query LIKE and grab these posts on search results?
- How do I sort this custom list of sticky posts
- All Posts Have The Same Comments
- Trying to get property of non-object in: $wp_query
- I am officially missing something about transient posts
- Register Taxonomy – What is `query_var`?
- Block internal search queries with pre_get_posts and regex rules
- Is it possible to give a classname to specific comments in the WordPress admin?
- Is there documentation for objects returned by WP_Query?
- Search Field that allows options of “Match any keyword” or “Match all keywords”
- Show more than one post on the main page excluding certain category
- How to make a wordpress loop file that displays posts based on certain conditions
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- How do I display posts with specific value in a custom field into my loop?
- Orderby Meta Value and Query from Meta Query
- Order by multiple meta keys on wordpress
- Sort posts in dashboard using custom field; also include posts where field isn’t set
- Display post format post in the sidebar