Please change your args like this.
$meta_query = array(
array(
'key' => 'event_type',
'value' => 'featured',
'compare' => '='
)
);
$args = array(
'post_type' => 'event',
'posts_per_page' => -1,
'order' => 'DESC',
'orderby' => 'meta_value_num',
'meta_key' => 'event_date',
'meta_query' => $meta_query
);
Related Posts:
- Sorting a query by custom field date
- How to sort a table of custom posts by column containing custom field
- WP_Query order by custom field, then randomly order some of results
- Displaying custom field according to date
- Recoverable Fatal Error – Object of class WP_Post could not be converted to string
- Custom Post Type page sorts differently on different environments
- Sort custom posts by date and then by taxonomy
- Group/list/sort custom post type posts by date in tabs from acf datepicker field
- Grouping and paging CPT events by month with custom field date
- Can the Next/Prev Post links be ordered by menu order or by a meta key?
- How do I set the default admin sort order for a custom post type to a custom column?
- Filter by custom field in custom post type on admin page
- Getting custom taxonomy from custom post type
- Make custom column sortable
- Media library – Limit images to custom post type
- Using meta_query, how can i filter by a custom field and order by another one?
- Filter next_post_link() and previous_post_link() by meta_key?
- group search results by post type?
- register_post_type sort order by title by default
- importing third party json feed as custom post type [closed]
- Custom Post Type Archives by Date and Taxonomy
- how to get posts by custom post type then display Custom fields?
- Drag n Drop Post Order for multiple Custom Post Types
- Sort custom post type list table by display name of a user id stored as post meta value
- Custom sortable columns ordered by meta-value?
- How to order adjacent posts (prev / next) by custom field value?
- WordPress post sorting with AJAX
- Ordering posts by custom taxonomy in admin area
- Custom Post Type Archives by Date with Custom Permalink
- Custom Post Type, WP_Query and ‘orderby’
- Filtering a WP_Query meta_query by numeric values isn’t working
- Filter admin columns by custom post field value
- Populate a ACF Select Dropdown from Custom Post Type
- Custom Taxonomy Template Post List with Sort Order
- Ordering Posts List By Taxonomy Terms?
- Automatically fill custom field value on post publish/update
- Ordering posts having multiple post-meta date fields
- Column sorting with emtpy meta values
- Set Custom Post Type title to the Post’s Date
- Number of pages – multiple (custom) post types
- Filter a custom field based on selection of another custom field (ACF) [closed]
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- how to sort post in admin column by recently
- Make permalinks based on an ACF-field
- Custom Post type sort order not working in the admin area
- ACF Relationships in Custom Post Type Permalink
- WP Rest API Querying Custom Posts by ACF fields
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- Custom Post Type Archives by Date (stored as meta value) WP3.1
- Meta Query “IN” doesn’t work with ACF checkbox filter
- Retrieve a specific field from taxonomy term through advanced custom fields [closed]
- List events by month
- Use Custom Post Type as Custom Field
- Count custom post types with a specific meta value
- Alphabetical sorting of custom post type – one letter per page
- Query by 2 values of a repeater ACF field
- sort events based on event date custom field
- How to Sort Custom Field Admin Column by Date
- How to Sort by Date When Using d-m-Y Format
- Insert slider (Custom Post Type) into pages
- get terms that have post with custom post type between 2 values
- How to set custom post type as post title to avoid ‘Auto Draft’
- Pull image from ACF field in a Custom Post Type
- Archive filter disappears on no results?
- Query current and future events, ordered by begin date
- Sort Posts Best Practice
- Custom Post Type sorted by Title
- Show ACF field from custom taxonomy and display on the single template
- Change message given when deleting post from custom post type
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- Display posts if a custom field value is equal to another custom field value
- ACF Upload Image in repeater from front-end with custom form? – add_post_meta()
- Linking three taxonomies with ACF
- How to add new tab to admin list of posts and handle result list
- Formatting custom meta box date from YYYY/MM/DD to a more readable alternative
- Using date stored as custom field to filter posts displayed in admin
- Custom post admin filtering by post meta (the date)
- Sort by two dates. Default entry date and custom field if present
- Get Custom Field Values by Another Custom Field in WordPress
- WordPress custom post type archive with description
- wp_update_post based function works on existing posts, but not new posts
- How to Display ACF Relationship Custom Field as Link to Specific Custom Post?
- Show custom field from custom taxanomy term on custom post type
- How do I sort a custom post type admin column using two meta keys?
- Custom-post-type-archive: posts sorted/filtered by year?
- How to make in WordPress admin panel sortable column for the custom field, that count the number of page impressions?
- Query Custom Post Types by date (custom field) range
- query_posts with a custom post type, a meta_query and sorting by post date?
- sort order for a custom post-type [closed]
- Sort admin area by custom Event Date field
- How to replace custom post type slug with an ACF value?
- How to create an array for a CPT post ID to use in an IF/WHILE statement
- Link users to a custom post type
- Remove duplicated values from a loop
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- “add_post_type_support” with Custom Post Type & ACF
- Custom Post type with ACF in REST API, how do I get those values?
- ACF simple text field value not showing
- Post Object Filter by Custom Field, not title (ACF)
- Custom Post Types not showing, custom WP_Query