Try this:
$yoursearchquery = 'This is my search';
$users = new WP_User_Query(array(
'search' => $yoursearchquery,
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'shoe_size',
'value' => $yoursearchquery,
'compare' => 'LIKE'
),
array(
'key' => 'shoe_color',
'value' => $search_operation,
'compare' => 'LIKE'
),
array(
'key' => 'shoe_maker',
'value' => $yoursearchquery,
'compare' => '='
)
)
));
Related Posts:
- Getting all user metadata from user
- Reduce number of SQL queries inside WP_Query loop to fetch author data
- How to properly use AND / OR in custom search
- How to do WP_User_Query for Nested Array value Inside Nested Array field
- WP_User_Query not searching numbers?
- How to add custom query filters in WP_User_Query
- SQL query equivalent to WP User Query
- Query wp_usermeta alongside wp_users
- WP User Query get all authors with last name starting with specific letter
- WP_User_Query unable to retreive all user at once
- Minimize database queries to user tables?
- How to display specific posts with WP_Query?
- WordPress search posts by author name with autocomplete
- pagination with numbers for WP_User_Query
- Meta_query on same meta key, with diffrenct values
- WP User Query with Custom Fields and Search Results
- array of meta values using WP_User_Query
- WP_User_Query and user posts
- construct complex queries with WP User Query
- query post by author gender
- WP_User_Query orderby meta_val_num
- Replace wp_query with wp_user_query
- Counting instances of words in the results of a post query
- Random users always showing same 8 users
- SQL to join u3g_users & u3g_meta_value with repeating data
- WP_User_Query Orderby Not Working
- Unusual high query of user meta data
- How to query 5 users in random who have published more than 10 posts
- using custom meta user data to run queries in WordPress
- Best way to query posts and order by relevancy to query
- WP_Query within save_post doesn’t include the item that triggered the action?
- Search Functionality broken by the wp 4.2 update
- Query Users by post count, last 30 days and display each users post count according to post type
- How ‘secure’ are loops?
- Get all user with both meta_value
- WordPress WP_User_Query ignores the `meta_query` when called from an Ajax function
- Orderby meta _value that is saved as an array
- Group users by meta field, with name of meta field as group title
- Complicated `orderby` based on text in custom field
- Using a Query Loop Block with Variables (Custom Meta)
- I cannot get tax_query in get_posts() to work with custom taxonomy
- Related Posts with removing some categories
- how to show more than 1 post into three columns query
- Getting the last X posts, but in ascending order of time
- WordPress custom query by archive title
- pre_get_posts with WP_Query to prevent posts from specific tags
- how to get dynamic data on wordpress from codeigniter?
- How can I modify standard search query to include also ACF custom fields values?
- Meta key in wp_query bug?
- Using something else instead of using 9 wp_query
- make query more simplest and in one query
- Show All with Isotope
- display all posts from category with and without terms in chronological order
- How to display post based on which is clicked
- date_query problem
- Help displaying related categories
- WP_Query Not Working with Variable
- WP_Query doesn’t works inside loop
- Search Filter With Custom Taxonomy and Custom Fields : How do I handle it via plugin?
- A very strange problem with search query
- How to create page that lists tags by initial letter?
- WP_Query doesn’t return some child pages even though the database shows them
- Seach and categories not working when ignoring sticky posts in main loop
- query_posts based on a meta_key
- In Product Category archives how to show Posts having same/similar prod_cat slug structure?
- How to redirect a query string to a “virtual” subdirectory
- posts_per_page increment additional post
- Custom WP_query and integrating into theme file
- WP_Query returns images but post_per_page is incorrect
- Query by Category and Custom Field – Shortcode
- How to show all the associated posts with specific date of data metabox?
- Problem with custom WP_Query and underlying pagination/posts_per_page
- Track write actions to the database
- WP Query issue for multiple values
- WordPress wp_query add custom query as field
- Custom query return
- Display three sequential posts on each page load, without repeating previous
- How can I use two custom fields in WP Query
- Pull posts from all categories if quantity is not met?
- Calling a function with WP_Query only ever brings the first result
- Get a page ancestor from a most viewed list
- How can I use a specific wordpress page template if certain words are used in page title [closed]
- What argument does my function need to echo get_results() query results
- wp-query with a tax-query relation of NOT
- Custom query using WP_Query is not working
- Query_post 5 post first / last of post_id
- get last child post by wp_query
- Show subscriber id in loop
- how to avoid reloading/refresh the page when displaying the post of wp_list_categories
- Featured Image as Background with Offset
- WP_Query don’t working with fixed post_id and term_taxonomy
- custom WP_Query results in showing same posts in all pagination pages
- Calling body_class and wp_nav_menu for a different post
- Category Archive not working for pages
- View related categories in order of posts
- Rewind posts then show only first post
- modifying the loop multiple times with arguments passed through ajax to wp_query
- query only returning posts with already set custom field
- counting post from a wp-query using sticky_post
- WP_Query – show posts where meta value and user_email match