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
- WP_query with ajax filter not working with input fields
- WP_query is not returning the expected result
- ajax wp_query conditional tags not working
- I need to run a AJAX Fuction from within a WP_Query but only works on first item
- Change post query onclick
- Add AJAX “Load more” on custom query block
- How to filter a static post page with ajax and $wp_query
- wpquery via ajax
- Ajax (jquery) wp_query pagination returns -1
- 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
- Order WP_Query by meta_key priority when ‘OR’ relation used for multiple meta values
- JOIN filter doesn’t work in WP_Query in wp-ajax calls
- Multi-layered WP_Query
- Oxygen Repeater Advanced Query
- 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?)
- Nearby locations using Advanced custom fields, maps?
- WP_Query – display posts by custom field and order by another
- WP_Query for distinct meta values
- Group Product Types
- 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
- WPQuery Date and ACF
- Excluding posts from search results page with meta query not working
- Populate select list with meta values from all posts of a Custom Post Type
- Form checkbox value going to dynamic URL
- ACF: How can I publish values of ACF fields in a loop while using wp_query?
- WP Query by variable custom field
- WordPress live search and filter custom fields
- WordPress live search and filter
- create custom shortcode wp and put php code in
- 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
- Move some posts to end of sort order, even if there is a sort in the wp_Query already
- Why does my output of get_the_ID() change after a wp_query?
- How to get taxonomy image attached to a Post Type WordPress
- 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
- Custom query showing all acf field values instead of the one searched
- Ajax buttons not working properly in WooCommerce when using wc_get_template_part
- WP_Query, ACF field and array
- Load WP Query with Ajax
- Pre get posts sort by meta key returns no results if meta key does not exist
- How to query wordpress with array of meta_values?
- remove_action – pre_get_posts – does not restore original query
- ACF query-pass field value
- Slow wp_posts and wp_postmeta query using Advance Custom Fields
- Limit default Search query to post_title
- Query string order by custom field
- ACF: using two loops, the_field returns field content from another loop
- Order & Orderby clause not working with custom query
- 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
- How can I modify standard search query to include also ACF custom fields values?
- 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
- modifying the loop multiple times with arguments passed through ajax to wp_query
- Wrap group of wp query posts to parent div by date/year
- 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
- Wrote a WP Cron Plugin and it triggers a fatal error upon activation
- Declare inline background image in functions.php
- How to get query results for the next page
- How to solve this script problem in theme directory?
- WP_Query within save_post doesn’t include the item that triggered the action?
- I wan to process the following js to process the AJAX Request on my function to calculate author Total Post views
- WordPress WP_Query offset parameter not working with search parameter
- Issue in If else condition [closed]
- Why is $wp_query fetching nothing?
- Can’t get the_content to show
- Geo location query inside wp_query?
- 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
- Fire query on ajax post url page
- Get the type of an advanced custom field (ACF) in a WP_Query loop [closed]
- Sorting Posts Based On Meta Value Using AJAX
- Query posts filter not working
- Creating array to compare custom field values
- How return normal search result using wp_ajax action for wordpress
- Display all custom meta field values from the database using ACF Repeater
- Duplicate posts showing up in loop using infinite scroll
- Adding arguments to WooCommerce Product Loop using AJAX
- Output ACF field dynamicaly within a taxonomy loop [closed]
- Refresh wp_query with no changes
- Get posts using multiple values from ACF checkbox as meta query wordpress
- I want to place a post before all others from an ACF boleen field
- How do I subquery with custom meta fields?
- WordPress WP_User_Query ignores the `meta_query` when called from an Ajax function
- AJAX search function resets wp_query vars
- WordPress Ajax search filter on dropdown select