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
- register_post_type sort order by title by default
- importing third party json feed as custom post type [closed]
- Sort custom post type list table by display name of a user id stored as post meta value
- WordPress post sorting with AJAX
- Custom Taxonomy Template Post List with Sort Order
- Ordering posts having multiple post-meta date fields
- Column sorting with emtpy meta values
- Custom Post type sort order not working in the admin area
- WP Rest API Querying Custom Posts by ACF fields
- Meta Query “IN” doesn’t work with ACF checkbox filter
- 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’
- Query current and future events, ordered by begin date
- Change message given when deleting post from custom post type
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- 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
- Query Custom Post Types by date (custom field) range
- 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 and Custom Field WP_Query
- Display multiple custom post types and sort them chronological by one of their fields
- Order By Post Type ThenBy Taxonomy
- get_posts of Custom Post Type AND Custom Taxonomy
- Sorting custom post type columns with external data and without meta values
- the_content() not outputting anything (Advanced Custom Fields)
- How to add a post slug to a url?
- Trash / Draft a WordPress custom post after custom date field expires
- ACF Field on CPT Slug
- Custom Post Type + ACF and performance [closed]
- Store CPT ‘Reviews’ average ratings to a WordPress DB table or to a DB custom table?
- Meta Query Not Returning Output Despite Having Matching Values
- WooCommerce sort products by the actual product width(not the shipping width)
- Retrieve custom field from Contact Form 7 [closed]
- The loop seems stuck to a single (now deleted) post
- How to sort posts in a custom post type by title in ascending order by default?
- How to add/edit advanced custom fields on custom post type’s WordPress REST API?
- Custom post type sorting: alphabetical order
- Post loop count is not in order
- Can anyone clarify difference between archive-{posttype}.php, type-{posttype} and date.php?
- How to inherit field value from parent post into in child / sub post
- How to use single.php for creating, reading and editing Custom Posts with ACF
- Custom fields not showing in custom post type
- Group by custom field value (start and end times)
- wp-includes does not contain a feed template
- Using WP meta query to show custom post types by a start and finish date
- Sort column on meta key and meta value
- Advanced custom field – posted fields from custom post type
- What’s an easy way of sorting custom post types manually?
- How to display author details in a custom post type in the wordpress backend?
- Show/hide posts and categories based on user meta
- Fetch data from two custom post types and create multidimensional array for output to html table
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- How to order query results based on if a custom field has been populated, then the order by the date of the post?
- Set up a WP Cron scheduled event to update calculated ACF field
- Query filter by value in meta_value array
- Custom post ID & display information related to this ID
- How to set post date in post_type so that it’s same as latest post in category
- Expire post to draft by date-picker custom field
- WP_Query not using custom taxonomy categories on custom post type
- How would i insert a value of custom field from Advaced Custom Field into shortcode generated by Gravity Forms [closed]
- Issue to display Permalink (ACF Relationships in Custom Post Type )
- Auto generate excerpt from ACF field on a CPT that does not support excerpt or content
- Custom post type not pulling CSS
- How to sort post category using its Description
- Button link display in shortcodes using custom field in ACF
- How do I link to a dynamic ACF button from a Custom Post type?
- How to hide sub fields in a field group and also the entire field group if the answer selected is “no”
- Create 3 Levels of relations with WordPress
- Wp Query sort order from custom MetaBox
- Linking posts together with Advanced Custom Fields “both ways”
- Custom permalink rewrite rules – how do I fix this?
- Custom Field as Custom Post type element class
- Extracting Post ID and passing through as an attribute in a shortcode
- How to sort custom post’s category by id from the theme’s function.php?
- Automatically convert standard posts with custom fields to custom post types
- Submit and edit font end custom post type
- How to make a custom search template for custom taxonomy?
- Making my custom column sortable
- Get month and day from a Date Picker custom field
- Modifying and Displaying URL’s in a Post Template using parse_url
- Custom post type adding additional markup
- Advanced Custom Fields: query posts filtered by multiple field values
- How can I sort posts ascending by post title for a specific post type, but on a category archive template?
- WooCommerce – Complete Order when an action occurs
- WordPress Loop trouble with ACF [closed]
- Why custom search engine only searches in post titles of custom posts?
- Post object GUID adding http:/