You’ve got the unnecessary array involved around clauses. The correct code is
'meta_query' => array(
'relation' => 'AND',
'awards_clause' => array( // clause
'key' => 'awards',
'compare' => 'EXISTS',
),
'points_clause' => array( // clause
'key' => 'points',
'compare' => 'EXISTS',
),
),
'orderby' => array(
'awards_clause' => 'DESC',
'points_clause' => 'DESC',
),
Related Posts:
- Filtering a WP_Query meta_query by numeric values isn’t working
- Query based on custom fields start and end date
- Group by custom field value (start and end times)
- Using WP meta query to show custom post types by a start and finish date
- WordPress duplicating posts from single loop
- Mixing regular and custom post types (with meta_query) on home page
- WP_Query() show posts that end later than today
- WP_Query orderby custom field then post_date in one query
- Retrieving 3 latest post from each of 5 different custom post types
- Meta Query “IN” doesn’t work with ACF checkbox filter
- Using Query Posts With Multiple Post Types And A Taxonomy
- Query by 2 values of a repeater ACF field
- Can’t sort order of wp_query with 2 meta keys
- Comparing timestamps in meta query doesn’t work
- Display two post types ordered by two custom fields
- Combine tax_query and meta_query in WP_Query
- query order by date on custom type: wrong order
- exclude custom post type by meta key in wp_query
- Query current and future events, ordered by begin date
- Quickest way to get last or oldest post date – WP Query
- Display posts if a custom field value is equal to another custom field value
- Filter posts with meta_query NOT IN where value has multiple values
- Filtering by Post Meta Custom Fields – Performance
- Is it possible to apply a meta_query to one specific post type in a query with multilple post types?
- Remove duplicated values from a loop
- Custom Post Types not showing, custom WP_Query
- Custom Post type and Custom Field WP_Query
- Display multiple custom post types and sort them chronological by one of their fields
- Setting proper query for multiple custom admin filters
- WP_Query: include custom post type only with specific meta value
- Returning a list of custom post types excluding those without a specific meta_value
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- wp_query check if integer exists in custom field’s array
- WP_Query order by custom field, then randomly order some of results
- Troubles with acf/save_post and WP_Query
- A method for ordering mixed dates in search result loop (theory only, no actual code)
- Query custom post type with ACF Date
- How to do WP_Query with two meta fields with orderby clause
- Meta Query Not Returning Output Despite Having Matching Values
- Query Multiple Custom Posts by Custom Fields
- Why is this query not working? (Standard posts + custom post type)
- Order Custom Post Type by Custom Field Value
- Query Custom Post Type Taxonomy term with multiple parameters
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Possible to filter custom post type with multiple meta data?
- Why is my WP Query not returning first result’s post meta?
- Recoverable Fatal Error – Object of class WP_Post could not be converted to string
- WP_query – Filter by tax_query and meta_query using multiple select
- Getting a custom post’s custom field based on another custom post’s custom field select
- find custom post type post by searching its custom field with my string
- WP_Query of custom post type sorted by meta_key has unexpected results
- Create a WP_Query where if the first value of the first row is equal to the second compare other value
- meta query not retrieving posts
- Get posts by category name
- Query Posts, order by meta value
- WP_Meta_Query object with conditionals
- Sorting by meta_key different to search criteria?
- Two queries – one with checkbox ticked, one without – comparing meta_query
- How to properly use Categories with Custom Post Types
- date_query empty results with custom 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?
- Create if else for post types in WP_Query ‘post__in’ values
- Sort custom posts by date and then by taxonomy
- Using ACF values in nested WP queries for CPT with date values in the past
- Filter result of Custom Post Type using meta_query with ACF
- build child and anchestor three from post parent
- Query posts by current ACF meta key value on single page as related posts
- meta query condition don’t work
- Custom query result empty on page 2
- Use WP_query to match post types based on custom field values
- Filter posts by their related field’s custom field
- ACF meta_key and meta_value break loop
- meta query multiple values for the same key
- Sort custom post archives by a meta value from a different custom post type?
- Custom post types – meta_query: search lesson which starts sooner
- Query a custom taxonomy in a function to create an csv file
- Wrapping an unknown amount of posts inside separate HTML Containers during WP_Query loop
- Show specific posts with WP_Query using ACF Post object
- post type => ‘any’ not applied my custom queries
- Query posts based on user preferences
- How to get the posts that my following users are liked?
- Meta_Query refuses to return results
- Linking posts together with Advanced Custom Fields “both ways”
- Not able to get my custom search result using meta_query and tax_query together?
- Custom Field as Custom Post type element class
- How do I correctly query posts from a post ID?
- How to I add count of custom posts listed in a post as a prefix to its title
- Order Wp Query by earliest of 3 dates meta query
- Display ACF object field data using Elementor Custom Query
- WP_Query() displaying past post / event
- WP Query Conditionally query meta and taxonomy
- WordPress WP_Query Sort by 2 dates – custom fields
- WP_Query not using relation key as expected and not producing any results
- WP Query filtering by custom category not showing all relevant posts
- Meta query with ACF relationship field
- How can I filter records in a custom post type list in the admin based on the ACF field in the post that contains the current user?
- WordPress custom post type -> query and sort by custom field with multiple values, then published date
- Use Custom Field to Display Post Loop
- Custom fields disappearing when a custom post type is assigned
- get_posts() function does not honor correct post type