Just construct what you need outside of the main query.
// terms to search
$meta_query_keys = array('Panera Group 2 Encino', 'West Hollywood');
// start the meta query off
$meta_query = array('relation' => 'OR');
// add terms to query
foreach($meta_query_keys as $key) {
$meta_query[] = array(
'key' => 'user_group_name',
'value' => $key,
'compare' => 'LIKE',
);
}
// construct main query
$wp_user_query = new WP_User_Query(
array('role' => 'Subscriber',
'fields' => 'all',
'meta_query' => $meta_query,
));
Related Posts:
- wp query to get child pages of current page
- Pagination when using wp_query?
- Meta query with string starting like pattern
- WP Query where title begins with a specific letter
- WP Query orderby meta key natural sort?
- Count the number of images uploded on the website
- Query Custom Meta Value with Increment
- querying with custom meta field with meta_query
- Order by two meta keys
- multiple meta key but get server load is very high
- A WP_Query that will look for posts after 2 weeks ago OR with a certain meta value
- Ignore a filter on the media library
- Merge 2 args in one WP_Query and order it by date
- if wp_query taxonomy term have posts
- Pagination broken when merging search results with additional WP_Query
- How to display posts from multiple post type in random order in wordpress?
- How to bring specific post to front of wordpress loop?
- How can i get the last post from wp multisite?
- WP_Query, custom sort and custom filter
- Use meta_query to display events by date in custom field
- Calling WP_Query with the same args in two different places produces two different results
- Sticky Post default functionality with WP_Query is ignored when using AJAX
- tax_query OR with empty result returns all posts
- WP_Query Order by Specific Post ID First
- Custom Query – show first post twice?
- Next/Prev posts on same page
- Using one WP_Query object within the loop of another WP_Query object
- Order by slug in get_terms with multiple taxonomies
- Creating query to show which editor (classic or block) was last used to edit a post/page
- Is there any advantage of using default WordPress Search instead of creating a custom one?
- How to access WP database inside ipn.php? [duplicate]
- is_tax() function not working as expected
- Getting the current post number / make posts increment
- Optional Meta Query
- Set conditional on template based on referring page slug
- Multiple If Else with WP Query in WordPress
- Serve specific “template” page at any URL that ends in its slug
- WordPress pagination not working using WP_Query
- Meta_query on same meta key, with diffrenct values
- posts_per_page not working for first page of pagination
- Advanced ordering of query_posts
- Add class to first post in custom loop using post_class filter
- echo a specific meta_key queried through a custom post
- WP_Query with meta_query dosen’t return results
- Get latest post revision with wp-query
- How to show more post at a given category?
- WP_Query returns posts_per_page + 1 every time
- All posts returned when author of 0 is queried
- Merge two search functions for custom post type
- Filter Custom Taxonomy Posts
- Config.php issue in WordPress
- WP_Query – Accessing MetaValue from Query Result
- problems with comments_number()
- Trying to retrieve random post, getting a page
- WP_Query freezing
- Does WordPress have something like Drupal’s DB API?
- PHP – Loop custom post type categories within jQuery Tabs
- WP_Query by keyword OR post tag
- How order posts from category by date and comment count?
- Get a list of ACF Repeater-Fields as array
- query_vars empty when using custom url with custom rewrite rule
- Show single posts date, in a page of posts
- Post archive for certain post format
- Compare “Main” post ID to ID inside wp_query loop
- Attempt to display site authors in a carousel – User Image not Outputting inside li tags
- Add AJAX “Load more” on custom query block
- problem with the loop
- Order WP_Query by meta_key priority when ‘OR’ relation used for multiple meta values
- Why my query is not “Main_query”?
- Filter sub-category from checkbox form
- Meta Box WP_Query array for showing items with a certain relationship
- Facing problem with tax_query results
- How to add a “base” filter for all posts visible to visitors on the site?
- Pagination of custom page with custom fields query
- sanitize_post() is not sanitizing Post Object
- WP_Query() not filtering posts for category
- wp query search multi terms
- Unusual high query of user meta data
- Woocommerce featured products query no longer working
- add action for wordpress query at a specific position
- How to query wordpress with array of meta_values?
- Updating an intensive wp_query result once daily
- Custom WP_query and integrating into theme file
- Get newest value of an array
- Filter custom post type by custom taxomony
- Query post Pagination Problem
- Why does order ASC break offset in WP_Query?
- new WP_query using custom fields
- Having Trouble Running Query From Shortcode Using Tribe’s Events Plugin
- Change ‘post_modify’ with a query
- An archive page without post format (just standard post)
- Pull Instagram images into an existing loop?
- Pagination showing same posts despite changing page
- Getting posts via WP Query
- Print post data inside loop using theme content template
- Where to find WP_Query class?
- WP_Query with tax_query not working
- How to know which editor published a post programmatically?
- How to prevent WP query searching in executed shortcodes
- WordPress – Optimize the Meta Query for 3 meta keys at a time