You can include meta_query parametr in your WP_Query.
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'country',
'value' => 'value',
'compare' => 'LIKE',
),
array(
'key' => 'city',
'value' => 'value',
'compare' => 'LIKE',
),
),
Related Posts:
- WordPress dynamic AJAX query
- Display List Of Posts Containing a Relationship Field Value [ACF]
- Using OR conditions in meta_query for query_posts argument
- ACF Relationship Field Search Filtering [closed]
- ajax category filter
- Ajax and WP_Query/tax_query parameter
- ACF datepicker meta_query Compare Dates in m/d/Y g:i a – Not in Ymd Format
- WordPress meta_query and order by custom field
- get data from wp-query, outside the loop & without url change
- ‘posts_where’ filter not applying ‘WP_Query’ in `wp_ajax`
- Ajax Infinite Scroll In Custom WP_Query Loop Not Working
- meta_query with array as value
- WP_Query class not found
- Search – Ajax – Alter Query Parameters with Pagination
- WP_Query orderby breaks when using AJAX?
- Update Loop with Form
- Query Posts depends on custom field inside repeater field using acf
- Refine/Filter WP_Query Posts with jQuery or Ajax
- Show selected images on top in Media Manager
- Create unique page without header.php for json feed
- WP_Query ajax loader detect end of posts
- wp_query not searching with apostrophe
- ACF Date Based wp_query
- Using Ajax to load more posts | Help me change the wording on my button to notify the user
- Custom query based on meta key – Reduce three states to two in results?
- Ajax Pagination on Ajax filter
- Wp_query returning only one post while query through ajax
- Ajax load more posts – WP_Query parameters not working
- Any number in meta key (wp query)
- How do I run through a WordPress loop called from a filter function?
- Load More Posts Button – AJAX
- How to Union two different conditions in one WP_Query
- Excluding pages in WP_query using ACF
- How to do a wp_query with two acf-fields, sorting on one of them
- Using Advanced Custom Field for file upload, how do I load the file url
- Multisite wp_query & switch_to_blog issue
- Stuck in the query loop
- Current post in AJAX call is always zero
- Get all fields inlcuding “ACF” (Advanced Custom Fields) columns in wp_query
- Ajax future single post query doesn’t work when NOT logged in
- how update data through ajax and jquery
- Error with function in functions.php?
- JSON – Create rest api endpoint for Advanced Custom Fields
- Loading two different AJAX requests on two different pages
- AJAX Breaking Offset Argument In WP Query
- WP_Query offset is returning post from prevois loop
- Expecting statement error from php loop using ACF plugin
- Custom query filter by ACF date custom field
- Does WP_Query ‘responds’ badly to empty arguments?
- Retrieve data from wordpress db via input and put those result in dropdown
- I need to run a AJAX Fuction from within a WP_Query but only works on first item
- Change post query onclick
- How to filter a static post page with ajax and $wp_query
- How to pass the current content of $wp_query to a new page?
- WP Query orderby ACF boolean values and ACF field value
- Optimising WP_Query with ACF Fields
- JOIN filter doesn’t work in WP_Query in wp-ajax calls
- WordPress AJAX Request returns 400
- ACF: How to query for a given value count of an array like field? (e.g.: How many rows has a `flexible_content` field?)
- WP_Query – display posts by custom field and order by another
- WordPress Ajax form filter | Search by title with ajax form, breaks the other filters
- Why when I using infinity scroll the one post loads over and over?
- Using Ajax and WP_Query to load more posts on category page fails
- Excluding posts from search results page with meta query not working
- ACF: How can I publish values of ACF fields in a loop while using wp_query?
- WordPress live search and filter custom fields
- WordPress live search and filter
- Filter admin ajax data by url query
- Query for getting posts with their custom fields data in WordPress
- WooCommerce | AJAX | Product Pagination | Help me implement Ajax Pagination
- How to rearrange posts based on input field values added by WordPress “Advanced Custom Fields”
- Finding post ID dynamically on click
- WP Query with meta queries
- WP_Query, ACF field and array
- ACF query-pass field value
- Query string order by custom field
- ACF: using two loops, the_field returns field content from another loop
- Get posts meta_query by repater field
- Is instantiating WP_Query not possible within an admin Ajax call?
- WordPress conflict with multiple load more posts functions on click
- WordPress custom query by archive title
- Show All with Isotope
- Search Filter With Custom Taxonomy and Custom Fields : How do I handle it via plugin?
- how to avoid reloading/refresh the page when displaying the post of wp_list_categories
- Object of class WP_Query could not be converted to int inside shortcode
- Fetching $_POST from Page Template into functions.php
- WP_Query for liked posts is showing all posts if none are liked
- WP_Query within save_post doesn’t include the item that triggered the action?
- Issue in If else condition [closed]
- Can’t get the_content to show
- Inline Ajax call after term is appended with a @ or # etc. displayed in div
- The sorting of posts by a meta_query with two keys fails while separated as single queries it works
- How return normal search result using wp_ajax action for wordpress
- Display all custom meta field values from the database using ACF Repeater
- Output ACF field dynamicaly within a taxonomy loop [closed]
- Get posts using multiple values from ACF checkbox as meta query wordpress
- AJAX search function resets wp_query vars
- WordPress Ajax search filter on dropdown select
- How to use meta_query to retrieve posts from multiple custom post type
- WP_Query filtering in ACF field containing dates