If anyone comes across this question. WordPress Codex says the following to 'orderby' => 'meta_value'
and the order
param:
Note also that the sorting will be alphabetical which is fine for strings (i.e. words), but can be unexpected for numbers (e.g. 1, 3, 34, 4, 56, 6, etc, rather than 1, 3, 4, 6, 34, 56 as you might naturally expect).
You are querying event dates, so the order of the results might be wrong because of this alphabetical sorting.
Related Posts:
- Prevent pre_get_posts filter on specific post type
- Search multiple custom fields by using meta_query
- Custom Taxonomy with Custom Post Type Finds No Posts
- Impossible to get Attachments Outside WordPress?
- WP_Query custom post type query not showing the exact post type
- Detect inside a custom query the kind of post type to assign custom classes
- Display custom post type for specific user
- Related “custom post type” using “custom taxonomy”
- Is there a (preferable built-in) way to check what custom queries are used in a theme?
- Custom Form / Search with Custom Post Type Data
- How can I fetch all the dates from custom fields from various different custom post types and show / list them at one place in ascending order?
- Multiple WordPress Sites, Same Database but Filtered Content
- WP_Query for CPT with filter by another WP_Query
- Sort CPT by taxonomy AND THEN by custom field
- Filter by custom taxonomy slug on a custom post type
- Custom Post type and Custom Field WP_Query
- wpdb custom post_type problem
- Pagination on category page with custom post types
- Display multiple custom post types and sort them chronological by one of their fields
- Using DISTINCT in wp_query
- Using global $post; to get featured image for custom post via WP_Query
- Delete link on single-custom.php with redirection
- Query custom post type in the loop
- How to add pagination to wp_query [duplicate]
- How to structure a site with product variations pages?
- Related posts in all categories of current post (custom post types)
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- CPT: if more than X images are in post, use pagination
- Loop through Custom Post Type, and then show children within each iteration
- Why does querying on post_tags (which has been applied to custom post types) only return posts?
- Sorting multiple custom post types without a meta key/value pair by sort order
- Including Custom Meta with posts_where query
- Very Slow Page – How to Optimize # of Queries?
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- orderby in custom WP Query does not work
- Getting rid of /my_custom_post_type/ in the single view URL
- Custom post type menu missing after 3.0b2 -> 3.1.2 upgrade
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Custom Post Type – List all attachments on Edit Screen
- Can I create a loop with multiple post types and specify different $args for each post type?
- How to show CPTs in term archive
- Query custom post type by category slug
- Combining sorted and random CPT
- How to add post_type=value when editing that post type in the WordPress admin?
- Display CPT posts based on specific taxonomy
- Can’t query tag and post_type at the same time
- Group posts by custom post type
- Setting proper query for multiple custom admin filters
- shortcode to show custom post types by category
- Unable to retrieve any posts of CPT in wp-admin
- Custom Page that comes with preloaded content for the user
- WP_Query: include custom post type only with specific meta value
- Pagination on a custom post type loop
- showing custom post types of a certain category only
- WP_Query orderby modified to include custom meta changes
- WordPress custom loop filter by meta_key and value with serialize data
- How inefficient is it to use a Custom Post for 4-5 sentences & pull all to 1 page?
- Returning a list of custom post types excluding those without a specific meta_value
- query private custom post type
- Display custom post type from dynamic custom field
- Query/list all terms and their custom post count
- Linking to the most recent post in a Custom Post Type
- How to make sure content doesn’t display if selection is empty
- Filtering WP_Query Dynamically on the Front-End
- Show one item per category of a custom post type
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Storing posts from query and accessing later via AJAX call
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- How to check post type (to include custom css)
- How to customize a permalink (URL) structure?
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Genesis filterable portfolio isotope [closed]
- Plugin: register custom post types, child ready and performance best practices
- Query custom post type with tags
- Display only one post each WEEK
- wp_query check if integer exists in custom field’s array
- convert custom query to wp_query
- Wrong request query on cpt and tax
- How to Mass Delete Images from Media Library
- Previous/Next Link by Meta Value in CPT
- Show custom post type filtered by category
- Randomize Posts. Skip the first post in ascending order
- Creating a navigation menu of all posts of a custom post type and their children posts?
- Get custom taxonomies from multiple posts
- Pagination for Custom Taxonomy Page [duplicate]
- Filtering WP_Query
- Search / Filter posts on Title/Content OR Tags
- Pagination on with query_posts in custom post type template
- Wp_query: sort by PHP variable
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- Custom-Posttype & Custom Taxonomy WP_Query
- Permalink structure by Post Meta value
- Crafting WP_Query array, sort by date
- Custom loop with multiple taxonomy queries
- Return one unique custom post type result when it shares a custom taxonomy in WP_QUERY?
- How to integrate video slide using custom post types?
- Converting the_content string to an array?
- forming WP_Query for posts of all post types but from specific categories
- Get latest 3 posts from multiple CPT in one query
- Loop to fetch 3 post_thumbnail instances from 3 most recent custom post types named “portfolio”