You forgot to use relation
in meta_query
.
I think this will work:
$args = array(
'post_type' => 'brewery',
'post_status' => 'publish',
'posts_per_page' => -1,
'meta_query' => array(
'relation' => 'AND',
'review_rating_meta' => array(
'key' => 'review_rating',
),
'reveiw_count_meta' => array(
'key' => 'reveiw_count',
),
),
'orderby' => array(
'review_rating_meta' => 'DESC',
'reveiw_count_meta' => 'DESC',
)
);
Related Posts:
- Using meta_query, how can i filter by a custom field and order by another one?
- meta_query for keys that aren’t yet set
- WP_Query orderby custom field then post_date in one query
- Filtering a WP_Query meta_query by numeric values isn’t working
- Querying custom post type with 2 custom fields (date-range)
- How Can I save multiple records in same meta key?
- order by meta_value serialized array
- Comparing timestamps in meta query doesn’t work
- Display two post types ordered by two custom fields
- How loop through posts based on custom fields
- Display custom post types with custom date field value (before today) & order by custom date field
- Filtering by Post Meta Custom Fields – Performance
- meta_query compare >= not working but
- 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
- Filtering custom post type on a combination of custom taxonomies and custom fields?
- Meta Query Not Returning Output Despite Having Matching Values
- Meta Query Filtering not working on Custom Meta Box using Radio Buttons
- Meta Query posts not showing on ending date of custom field
- Admin Custom Meta Box – Pull Last 5 Posts from Custom Post Type
- How to Output which matched meta_keys were found from custom_type_posts?
- Possible to filter custom post type with multiple meta data?
- filter search custom field query
- How to let users choose where to search for posts?
- Query based on custom fields start and end date
- Getting a custom post’s custom field based on another custom post’s custom field select
- Custom Query: If One Post Object Field Value Is The Same As Another
- Using OR relation in meta_query to check for a value before sorting by another
- Unable to gather Image URL from Custom Post Type’s; Custom Meta Field
- Meta query and compare “!=” not working as expected
- Orderby if between two meta fields
- Show posts from WP Custom Post Type selected from a field in a metabox
- 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
- Meta_Query refuses to return results
- Sort loop by custom field from different post type
- Meta_query by date for Events archive
- Query events post type after current date and timezone
- Selecting posts older than the current Unix epoch timestamp
- Unable to get the upcoming events for custom post
- WP_Query arguments: Loop through custom post type – get all entries except excluded meta_key?
- loop through custom post-type with two meta_keys
- Querying meta values within an array
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- Get Posts ordered by a date custom meta field
- Check for custom field value in different post type than current one and do something
- Function to Compare CPT Post Custom Value with Default Posts CF Value
- Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?
- Search multiple custom fields by using meta_query
- Custom Post Type – Taxonomy Dropdown Menu?
- How do I implement custom fields without using any plugins?
- How I check if the same post slug has not been used before publishing?
- Custom post metadata not appearing in public API
- Automatically Insert Custom Field on Custom Post Type Publish
- Query for custom post type objects in a taxonomy and with a meta value
- Create a post in custom post type using field in registration form after users submit form
- WordPress custom meta field for custom post not storing data
- Conditional regex in add_rewrite_rule() for specific query filters & pagination
- List all images from a single post meta value
- Publish an XML feed from a CPT with ACF fields?
- Meta Key Value in current-user-only loop
- dynamically add a custom field or metabox to custom post type [duplicate]
- How to implement a Google map store locator
- Random image from tag/custom type on sidebar
- Set a maxlength for the title input in a custom post type
- Update Post Meta for a logged in user
- Problem querying Custom post type by custom fields
- Using custom field content as expression in IF statement [closed]
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Cross reference custom post types
- How to customize work area / admin area in a custom post type without plugins?
- Is it possible to load a different sidebar in single.php based on a meta_query filter?
- delete_post_meta() for whole CPT / multiple posts?
- Querying multiple values from a single key
- How to inherit field value from parent post into in child / sub post
- How to get_term_meta on single custom post?
- How to fetch custom post types with its full data on wordpress?
- Generating and downloading files with WP API
- Using WP meta query to show custom post types by a start and finish date
- Add a class to post_class if more than one post shares same meta_value_num
- Front-end Image Upload to Custom Meta Box
- How do I list a custom field and custom taxonomies for each result in a loop?
- Display Posts that fit a certain criteria on Category pages
- Sort custom post column by generated value?
- How to only display all posts to a custom User Role?
- register_rest_field update_callback don’t work for $_FILES
- Filter custom WP_Query by first letter of a custom field – hopefully using Search and Filter Pro?
- PHP Notice: Unidentified index
- check_admin_referer not working in custom meta box for custom post type
- Meta query broken since 4.7.4 Update
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- I want to split this into two functions
- How to store datetime from custom meta box so that it can be sorted by
- Custom Post Meta on a Different Page?
- Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?
- Display ACF object field data using Elementor Custom Query
- Sortable admin columns ordering from custom fields isn’t combine com search and Dropdown filter