Please have a look in the WP_QUERY improvement and the WP_QUERY Order & Orderby Parameters.
$args = array(
'post_type' => 'event',
'post_status' => 'publish',
'orderby' => array(
'meta_key' => 'ASC'
),
'meta_query' => array(
array(
'key' => '_start_eventtimestamp',
'value' => date('Ymd'),
'compare' => '>='
),
),
);
Hope it will work for you!
Related Posts:
- Meta query with string starting like pattern
- compare meta_query in get_posts arguments
- 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
- WordPress altering my custom query, How to fix it?
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- meta_key and meta_value not working together
- Order Posts by meta value AND published date
- How to make Meta Query case sensitive?
- 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
- Extend product search with meta in WooCommerce
- how to make members list directory through wordpress post custom meta key.
- Large AND OR query timing out
- meta_value_num not ordering all items
- meta_compare not comparing whole integer
- 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
- 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?
- WP Query – grouping posts by same meta key, adding together values from another key
- meta_query is overriding default search
- Trouble with serialized metadata
- Comparing Meta Field date in WPQuery using Meta_Query?
- Getting posts by custom field value
- Query against multiple locations within single custom post type post
- WP_Query, ACF field and array
- Order by Date Custom Field
- Query by meta value (add a dropdown of all values)
- Order Posts By Custom Field That is an array of objects
- Custom WP_query and integrating into theme file
- Using custom field as ‘orderby’ value causing post grouping by publish date
- Compare meta key separation
- query post based on comparison
- Get posts by meta value except one post [closed]
- Can wp_query return posts meta in a single request?
- Display products from specific category in shop page
- Changing the meta_query of the main query based on custom query_vars and using pre_get_posts
- Meta Query with AND & OR?
- meta_query where value is equal to given value
- Wp_query order by multiple custom fields?
- Comparing timestamps in meta query doesn’t work
- Order By Multiple Meta Fields
- Advanced WP Query hogs the SQL server
- How to get user_id from wordpress database inside ajax function?
- getting posts and number by specific meta value in multiple meta
- WP_Query with multiple meta fields filter?
- How to combine meta_query and post__in in WP_Query
- How to orderby meta_value_num with dollar ($) sign
- Get posts for which a custom field is not present, with get_posts
- Output an array of terms for a ‘tax_query’ => array()
- Meta Query Array Error 500
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- How to Filter Posts by Custom Fields?
- wp_query check if integer exists in custom field’s array
- meta_query not working as expected
- Query based on custom fields start and end date
- Query posts with “non set” meta value
- Is it possible to retrieve all posts with a certain value for metadata?
- Ordering a mysql style datetime stamp with meta_query
- wp_query get data from advanced custom field in wordpress
- meta_query: check if number exists
- Event with multiple dates, display events chronologically
- WP ForLoop to compare meta information of posts to determine what post to display
- Retrieve select tag custom values from array and display them in current page with wp_query?
- How to use a dropdown to filter posts by custom field
- Querying a large number of posts including their custom fields data
- WP Query / Meta Query [duplicate]
- Query posts by searching for a string in a meta field
- How to add date_query to meta_query array
- Combine query in WP_User_Query()
- Multiple nested meta queries
- How can I modify the query by adding to the existing query?
- WordPress Query custom ordering by temporary variable
- How to create better WP_Query to look for date time which is anywhere between two meta values?
- Filtering WP_Query based on wp_postmeta keys values
- using custom meta user data to run queries in WordPress
- Multiple meta_query not working
- compare for multiple meta values for same key in wp_query
- datetime picker, timestamps and meta queries
- WP_Query with meta_query won’t orderby
- meta_query only check if both value are set
- Wrap group of wp query posts to parent div by date/year
- Extending WP Query: Custom geolocation meta values work, but tax_query breaks
- Sorting Posts with meta value not working
- Looking for a way to exclude frontpage and nav menu from query filter
- Creating Custom Query
- WP_Query by meta key not returning any posts
- WordPress extremely slow when using get_posts with multiple meta_query relations
- Use value from meta key array for use in WP_Query
- WP_Query sort by ACF date field (newest first) with blank dates first