A php issue retuning different results on 2 or more synced environments (if each env db data is the same and any passed data is the same)… that could be tricky.
The only other thing I noticed is your meta_query
arg does not contain a child array containing state_clause
and prop_type
.
Your code is…
'meta_query' => array(
'state_clause' => array(
'key' => 'state',
'value' => 'WI'
),
'prop_type' => array(
'key' => 'property_type'
)
),
You might need to wrap both inner meta_query
args arrays into another array, see example below…
…and possibly you may need to include a relation
argument/key… see the end of the orderby WP_Query docs
'meta_query' => array(
array(
'state_clause' => array(
'key' => 'state',
'value' => 'WI'
),
'prop_type' => array(
'key' => 'property_type'
)
)
),
Related Posts:
- 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
- Sort a custom post with ACF: Date Picker & Display Featured!
- 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]
- 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, WP_Query and ‘orderby’
- Filtering a WP_Query meta_query by numeric values isn’t working
- Filter admin columns by custom post field value
- Sorting a query by custom field date
- 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
- Column sorting with emtpy meta values
- 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?
- 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
- 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
- Custom post type ‘orderby’ => ‘meta_value’ not working
- Rewrite WordPress URL to show CPT meta field data
- Create 3 Level Relations with ACF and WordPress
- Custom Post type and Custom Field WP_Query
- How to rank custom post type from score points
- Display multiple custom post types and sort them chronological by one of their fields
- Sorting multiple custom post types without a meta key/value pair by sort order
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- Order By Post Type ThenBy Taxonomy
- Multiple ACF Repeaters within a Custom Post Type