The parameter should be orderby
rather than order_by
. (See codex)
Related Posts:
- WP_Query orderby date not working
- Ordering by meta_value AND date NOT WORKING with wp_query
- Orderby ASC changes to DESC in WP_Query
- Complex WP_Query order request: DESC by day, but then ASC by time
- WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
- Get posts that were most recently tagged
- WP_Query sort by ACF date field (newest first) with blank dates first
- Order by optional meta key?
- Order by DESC, ASC in custom WP_Query
- WP_Query order by multiple meta keys & fields
- Secondary Sort (fallback) for WP_Query
- Query Posts in a Predefined Order
- How to get order of posts?
- Get Recent Posts by Date in Multisite
- How do I order pages and categories by ID or name in the same query?
- WP_Query ordered by custom field that is a date string?
- Merge 2 args in one WP_Query and order it by date
- Revolution Slider Orderby Two Custom Fields
- Order posts ascending with number in title
- List taxonomy terms plus their latest post ordered by post date
- How can I hide posts that are over 2 years old
- Use meta_query to display events by date in custom field
- How to use order RAND() on WordPress?
- Show all parents and children in custom post type in right order
- How to show recent and upcoming birthdays using meta_query
- WordPress WP_Query orderby being overwritten
- WP_Query Order by Specific Post ID First
- Order Posts by meta value AND published date
- How can I pick a single post from the latest 3?
- WP_Query meta_query >= date
- Order WP_Query by multiple fields, subtracting them from one another
- Complex Orderby Parameters: How to query with multiple orderby parameters using meta_value_num?
- pre_get_posts order by not working
- Comparing dates in custom field
- How to display upcoming events by dat with Modern Events Calendar Lite
- SQL: What is wrong with the following query (generated by WordPress WP_Query, ordering prices)
- Order By table field comment_status in WordPress > 4.0
- WP_Query order result by date AND meta_value
- Order by title without taking into account ‘the’
- WP_Query orderby author__in
- How to orderby multiple meta fields if some fields are empty
- Weird orderby => post__in issue
- How to order posts by title after they have already been sorted by category
- Advanced ordering of query_posts
- meta_value_num not ordering all items
- Taxonomy and Date in same query?
- Shortcode for latest -not expired- posts
- date_query seems to be ignored by wp_query
- How to filter a query by multiple meta keys and order by other meta keys
- WP Group posts by year(desc) > month(desc) > date(asc)
- Debugging wp_query orderby for taxonomy
- WP Query – order posts by meta field first and then order the rest
- How to Create a Random List of Child Pages
- Specify strict ‘order by’ in WordPress query
- Order is breaking wp_query
- Filtering posts by archive showing all years
- How order posts from category by date and comment count?
- Ordering posts by custom field and grouped by month
- WP_User_Query orderby meta_val_num
- WP_Query custom order and pagination
- Show single posts date, in a page of posts
- Orderby two meta fields not working
- Added Date Filter To Popular Posts Query
- Sort posts using multiple custom fields and menu_order in single query?
- WP_Query order by multiple meta keys & fields
- What’s wrong with this meta query? (order by meta key, then title, doesn’t work)
- Custom order of posts in wp_query and different taxonomies
- WordPress Query custom ordering by temporary variable
- Comparing Meta Field date in WPQuery using Meta_Query?
- Custom order revolution sliders post base slides as inserted in Specific Posts List field
- WP_User_Query Orderby Not Working
- How to get only present and past posts with post_date
- Order posts by tags count?
- Query Order By Number Variable From API
- How to get_comments() ordered by date and parent?
- Order 2 meta_queries differently in WP_Query?
- WP Query. Ordering posts by another post types meta
- WP_Query: custom orderby (not ASC nor DESC)
- Order & Orderby clause not working with custom query
- wp_query sorting – one specific meta_key value at last and then sort by create date
- Order posts by more than one variable (meta_key and publish date AND time)
- Create custom order sortby based on array of id
- Best way to Order Post in Home without a plugin
- orderby in WP_QUERY – Use the order from the Dashboard
- Query All Attachments and Order by Parent Publish Date
- Order posts by custom column using pre_get_posts
- Add filter to Orderby Parameter using Array
- Order WP_Query results in order other than ASC or DESC
- Show sticky post before other WP_Query
- Custom query to order by multiple taxonomies
- Year based WP Query
- Sorting: custom query with orderby meta_value_num THEN by title
- orderby in WP_query doesn’t works
- WP_Query with several meta_query-statements and order by meta_value
- Order by meta values
- orderby and order filter in get_posts or WP_query function in wordpress not working
- Order Wp Query by earliest of 3 dates meta query
- Why does wp_query only display the most recent post when using order ASC?
- How to put posts with some taxonomy on top of others in `pre_get_posts`
- new WP_Query with order args – no more distinction between categories