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
- Getting custom taxonomy from custom post type
- Make custom column sortable
- Filter next_post_link() and previous_post_link() by meta_key?
- Drag n Drop Post Order for multiple Custom Post Types
- Ordering Posts List By Taxonomy Terms?
- Automatically fill custom field value on post publish/update
- how to sort post in admin column by recently
- Make permalinks based on an ACF-field
- List events by month
- Use Custom Post Type as Custom Field
- How to Sort Custom Field Admin Column by Date
- Pull image from ACF field in a Custom Post Type
- Archive filter disappears on no results?
- Sort Posts Best Practice
- Custom Post Type sorted by Title
- 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?
- How to make in WordPress admin panel sortable column for the custom field, that count the number of page impressions?
- How to replace custom post type slug with an ACF value?
- Link users to a custom post type
- How to rank custom post type from score points
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- Combining sorted and random CPT
- Validate custom fields before save using WordPress Rest API
- How can I dynamically add a post to a custom post type which uses a custom field?
- Problem with WordPress query on page using custom fields
- Default sort on admin columns with meta date hides draft posts with empty date value
- Crafting WP_Query array, sort by date
- Custom Taxonomy terms aren’t getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?
- WP_Query to select custom post type with Advanced Custom Fields (ACF) date
- Troubles with acf/save_post and WP_Query
- Query custom post type with ACF Date
- custom post type WYSIWG removes paragraphs when displayed
- ACF From & To Date Validations
- Exclude objects from WordPress API based from ACF field using rest_prepare_{$post_type}
- CPT archive admin menu label
- Rewrite Rule for showing Parent/Child Relationship between Two Hierarchical Custom Post Types
- Order Custom Post Type by Custom Field Value
- Sort and filter custom post type posts by custom taxonomy
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- How to update post meta on uploaded image from a custom form?
- Order post by date with ACF
- Adavnced custom fields relationship query plus query inside
- Querying & displaying custom post type into an existent page [closed]
- Custom post type showing same Post on all Pages
- Post loop count is not in order
- How to inherit field value from parent post into in child / sub post
- ACF for custom post type archive pages: which hook to use?
- Creating a “glossary” of WordPress posts of a specific post type
- Advanced custom fields Post Object image field not displaying in custom post type single.php
- Sum and count of custom field values
- How do I show a link or ‘Read More’ button on a custom field excerpt when it is less than the word limit
- meta query not retrieving posts
- Custom Sidebar in Editor (not Widget) for Custom Post Type in Genesis
- sort by name (slug) custom post type
- SQL query – get ids – Advanced Custom Fields / WPeC
- Custom loop request based on custom field
- How to set a ‘page’ as parent of a custom post type?
- Custom front-end form for adding post – Category problem
- Query posts by current ACF meta key value on single page as related posts
- Show custom post type event if current day using ACF
- Filter posts by their related field’s custom field
- If ACF Post Object post has custom taxonomy term…
- Custom post type order by post_title
- Modify Publish Metabox location on CPT
- Changing default admin column sorting to an ACF Date Picker field
- Permalink URL connection between two custom types
- Wrapping an unknown amount of posts inside separate HTML Containers during WP_Query loop
- Show specific posts with WP_Query using ACF Post object
- Autofill advanced custom field with user data
- Advanced search form with multiple custom fields
- Custom post type option page template
- Some permalinks on Apache/localhost development setup return 404’s when set to anything other than plain permalinks
- sorting in wp query based on custom field value
- How to get a custom post type archive paged when using a custom field for post sorting?
- save_post affect creation and deletion
- Can’t pick up a field created with Advanced Custom Fields
- How to query posts by meta keys AND under specific category?
- using ACF datepicker to filter posts on a page
- how to load custom single.php?
- Setting a custom $query->query_vars[‘meta_key’] breaks the WordPress menu
- Function that get ACF fields value before saving
- How to query the content of a specific custom post type?
- Custom Post-type not returning the right child_of
- Register a title automatically with a relationship field
- ACF – Query relationship without ID
- 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
- Sort CPT by taxonomy AND THEN by custom field
- Custom order of CPT posts by title, in wp-admin area by default
- Sorting by Title for Post Archive Categories for Custom Post Type