'orderby' => 'date meta_value_num',
'meta_key' => $meta_key,
'order' => 'DESC'
Related Posts:
- meta_value_num not ordering all items
- Meta query with string starting like pattern
- compare meta_query in get_posts arguments
- Sorting: custom query with orderby meta_value_num THEN by title
- Custom WP_Query order by post_meta and (author) user_meta
- Sorting posts by custom date fields (non standard date format)
- Getting attachments by meta value
- querying with custom meta field with meta_query
- Order by meta_value_num DESC and meta_value ASC on WP 4.0
- Trying to perform complex custom field query with order by set to field value
- Order posts by date and then by custom field
- How to order a post type with meta_value_num and if meta_value_num does not exist then order by date
- Revolution Slider Orderby Two Custom Fields
- WordPress altering my custom query, How to fix it?
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- Order by meta_key in custom post type doesn’t affect the query
- meta_key and meta_value not working together
- Order WP Query posts by custom order calculated from post meta values
- Meta query with order by another custom field
- Complex Orderby Parameters: How to query with multiple orderby parameters using meta_value_num?
- pre_get_posts order by not working
- SQL: What is wrong with the following query (generated by WordPress WP_Query, ordering prices)
- How to make Meta Query case sensitive?
- How to orderby multiple meta fields if some fields are empty
- Fetch Record based on meta key dates
- Meta_query with multiple keys and multiple values
- meta_query BETWEEN, but the range is stored in the custom field
- Understanding the orderby in WP_Query?
- Extend product search with meta in WooCommerce
- how to make members list directory through wordpress post custom meta key.
- Order by empty custom field
- Large AND OR query timing out
- Help ordering Post loop by two meta values
- Order ascending is ignored in meta query?
- How to filter a query by multiple meta keys and order by other meta keys
- meta_compare not comparing whole integer
- Advanced WP_Query with meta_query, orderby?
- Display posts with specific value first in query
- Get every post with value in meta key
- add_query_arg to compare and display events from a certain date
- Comparing 2 Decimal Numbers from custom fields and displaying posts
- Sorting posts by Multiple custom fields in defined order
- Sort posts using multiple custom fields and menu_order in single query?
- meta_query weird behaviour, static int will work, but not user data
- Query multiple post types, but different order for each
- Order by the first array within a meta_query
- Query ACF relationship field – Comparator IN – Value array
- ACF: How to query for a given value count of an array like field? (e.g.: How many rows has a `flexible_content` field?)
- How to _GET multiple value checkbox WP_Query in Custom Toxonomy / Custom Fields
- How do i create a custom post query when the meta value is an array?
- What’s wrong with this meta query? (order by meta key, then title, doesn’t work)
- WP Query – grouping posts by same meta key, adding together values from another key
- meta_query is overriding default search
- Trouble with serialized metadata
- WordPress Query custom ordering by temporary variable
- Comparing Meta Field date in WPQuery using Meta_Query?
- Meta query orderby meta_value_num sorting by role first
- WP_User_Query Orderby Not Working
- Getting posts by custom field value
- Query against multiple locations within single custom post type post
- WP_Query, ACF field and array
- Order 2 meta_queries differently in WP_Query?
- Order by Date Custom Field
- Sorting with meta_query and multiple, optional meta keys
- WP Query. Ordering posts by another post types meta
- Query by meta value (add a dropdown of all values)
- Order Posts By Custom Field That is an array of objects
- wp_query sorting – one specific meta_key value at last and then sort by create date
- Custom WP_query and integrating into theme file
- Best way to Order Post in Home without a plugin
- Using custom field as ‘orderby’ value causing post grouping by publish date
- Order Custom Field by Price
- Compare meta key separation
- Using orderby with 2 meta keys
- Sorting: custom query with orderby meta_value_num THEN by title
- query_posts with sorting on a custom datestamp
- query post based on comparison
- WP_Query with several meta_query-statements and order by meta_value
- Get posts by meta value except one post [closed]
- WP_Query sort by ACF date field (newest first) with blank dates first
- How to query posts based on lat-lng coordinate as post meta?
- Set Alias for meta_query arguments in get_posts()
- How can I use order_by to order by two meta_keys without excluding posts that don’t have those keys initialized?
- WP_Query meta_query where meta value ends in space
- Query sticky posts with thumbnails
- Show all parents and children in custom post type in right order
- exclude posts with a specific custom field and value
- How to do WP_Query with two meta fields with orderby clause
- Get a list of posts with associated meta_value
- database query with more than a couple meta hangs and doesn’t complete
- WP Query – Is this correct?
- it’s possible make a WP_Query with math operations?
- WP_Query orderby
- WP_Query random ordering not working since 5.4
- Problem with my loops
- meta_query compare > not working
- WP_Query with meta_value_num and meta_query not paged correctly
- Sort Posts with custom meta key by default which is currently set as optional
- Why does wp_query only display the most recent post when using order ASC?
- new WP_Query with order args – no more distinction between categories