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
- How to use a custom post type archive as front page?
- Mixing regular and custom post types (with meta_query) on home page
- How to make a WP_Query search with custom post types?
- $wp_query->queried_object->ID throws warning: Undefined property
- The Operator “NOT IN” Does Not Work In tax_query
- WP 3.1 – archive pages for custom content types possible now without a plugin?
- Display Custom Post Type Fields
- Admin Post Update Redirection to Posts Screen
- Use WP_Query object inside a function
- WP_Query search custom posts meta date fields
- Get posts with tag all post types
- How to get the parent’s taxonomy?
- Using new WP_Query in shortcode in a custom field causes the main post content to not display
- Single Page WordPress CSS and JS links
- WordPress query by multiple Custom fields and order by date
- Help with hierarchical custom taxonomies and permalinks…almost there
- Disable dragging of metaboxes in custom post types?
- How to delete all posts from a custom post type?
- Structure for projects and clients
- Query custom post types and a specific page?
- Optimised Code for Pulling Taxonomy Posts
- Why is my custom loop not filtering correctly nor paginating?
- Custom post types with custom directories
- How can I get the first 50% of all posts (within a custom post type)?
- Custom query shows custom post types in trash
- Fetch taxonomies by custom post type id array
- is there a way to retrieve posts that do not have a featured image assigned?
- Custom Post type and Custom Field WP_Query
- Display multiple custom post types and sort them chronological by one of their fields
- Using DISTINCT in wp_query
- Related posts in all categories of current post (custom post types)
- Why does querying on post_tags (which has been applied to custom post types) only return posts?
- Group posts by custom post type
- Genesis filterable portfolio isotope [closed]
- Plugin: register custom post types, child ready and performance best practices
- Pagination on with query_posts in custom post type template
- Loop to fetch 3 post_thumbnail instances from 3 most recent custom post types named “portfolio”
- Custom post ui plugin & WP_Query – Polylang
- How to use load more custom post type data normal or according to on click category tab In WP
- Polylang non-default language ignores tags in WP_Query
- wp_reset_postdata() and wp_reset_query() inside shortcode are not working to reset original page query
- How to add attributes to taxonomies that may be different from post to post?
- custom post type vs. conditionally displaying meta boxes for specific terms?
- Edit the_content() function so to add a div wrapper
- How to make WP_Query not to show irrelevant posts?
- Replace dynamically content in a custom database table when a custom post is created
- WP_query – Filter by tax_query and meta_query using multiple select
- Create a list of recent Custom Post Types posts
- Custom post type menu
- Empty search input does not return all posts
- How to sort a WP_Query by a custom field AND ALSO filter by a different custom field
- Get current user id
- How to get the current category with custom posts
- List latest post out of 2 custom post types
- What is the best way to manage small blocks of content on my home page?
- One post auto attached to many another items
- How do I “trash” a custom post type post while logged in as Admin
- Auto update publish date of CPT Post if default post custom field value match to cpt post CF Value
- WP_Query – How To Query Only Custom Posts With No Children of Their Own?
- Foreach result into WP_query
- Query custom post type and custom field by URL parameters
- wp delete duplicate entries of custom post types every 15 minutes
- Custom Taxonomy – fields
- CPT Loop, include taxonomies and disclude others?
- Query posts based on user preferences
- How to use costum database table for custom post type
- connect users to Custom post types
- Custom Pagination based on Custom Post Type
- Custom user roles
- Querying, storing, and using data from 2 separate custom post types
- Custom Post Type
- How can I use WP_Query argument ‘Like %..%’?
- WordPress custom post type
- Custom Post ‘Post Per Page’ Crashing Page?
- Custom metabox value not saving
- Query child posts on parents single.php?
- Custom Post Query Combined with Conditional Tags
- Custom loop won’t work, can’t find problem
- Query by post type or category
- Customising wordpress search and using $_GET[“s”]
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- How to exclude certain portfolios from a loop
- Advise on Custom Taxonomies and Structure
- show the most recent date of all posts to display on front end
- Default WordPress Query for a Specific Custom Post Type URL
- Dynamically count the number of custom post types associated to a custom taxonomy