What you are doing is not a valid way of retrieving and checking serialize data from the WP. You may insert array as a user meta but this array behind the scenes is transformed to serialize string something the MySql can handle.
There are options for searching with the LIKE operator but I don’t endorse this use as it can lead to unexpected results.
$args = array(
'number' => 1,
'count_total' => false,
'fields' => 'ID',
'meta_query' => array(
array(
'key' => 'user_biodata',
'value' => 'yourValue',
'compare' => 'LIKE',
),
),
);
$users = get_users($args);
Related Posts:
- get_users with Serialized Custom Meta Value
- Query for user roles and their skills
- WP_User_Query with combined meta query – not working?
- get_users meta_query
- How to add follow functionality to multi-author wordpress site?
- Search multiple meta keys at once
- Plugin that would allow WordPress Authors to “follow” other Authors and query “Activity Info” from that
- delete_user_meta Delete one value out of array
- User Relationship
- WP User Query fails when searching meta queries and search columns
- User meta query results in PHP notice: only variables should be passed by reference
- How to pull all the contributer users records and order by Designation (which is users meta data)?
- ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?
- last_name + first_name orderby with meta_query [solved]
- how to search all user meta data that have value like “vivek”
- wordpress meta value compare between two date
- get_user can’t read variable
- meta_query orderby sort multiple keys
- Get all user with both meta_value
- wp_user_query with meta_value_num for leaderboard
- WP_User_Query get_count issue with meta_query relation
- user_login vs. user_nicename
- How to do a meta query using REST-API in WordPress 4.7+?
- Adding fields to the “Add New User” screen in the dashboard
- Difference between update_user_meta and update_user_option
- How to filter users on admin users page by custom meta field?
- get_user_meta() doesn’t include user email?
- Meta query terribly slow
- Automatically delete inactive users after 2 months
- meta_query sorting by 2 keys
- Check if user is admin by user ID
- How can I query all users who registered today?
- Get result from meta_query() between two numbers
- How to handle optional end date in compare clause in meta_query
- Return all users with a specific meta key
- Using meta_query on pre_get_posts to exclude a particular meta_key value
- Where the Nickname is being used in WordPress
- How to display custom user meta from registration in backend?
- Allowing an email as the username?
- Grouping users under parent user
- get_users is expecting unserialized meta_value
- How to get users by a custom field / by user meta data?
- Query between two meta keys
- How to create a template for a custom URI associated with the user
- How to order users alphabetically by their last name?
- Getting all user metadata from user
- Archives for custom post type based on a “date” meta value
- How do you add a custom option to user data?
- Extending WP_User class and using this sub-class during the whole lifecycle
- Wp_User_Query not sorting by meta key
- Add a button to users.php
- How we can get the user id by its display_name
- How to check a single number value against an array of meta_key values?
- How to use hyperdb to separate and share a user dataset between wordpress installs?
- LEFT JOIN, INNER OUTER JOIN, LEFT OUTER JOIN is driving me crazy. Please help?
- \WP_User Object | What’s the Difference Between {caps} and {allcaps}?
- Show Biographical Info while creating new user
- Meta query with multiple logic (AND / OR)
- Best practice – Meta Query vs. post_clauses for “left join” ordering
- meta_query with multiple values
- include user profiles in search results?
- Combining Meta_Query key values for one array
- Different page parameters inside query
- How may I filter get_users() similarly to pre_get_posts?
- Return posts with specific meta key first, but the rest in alpha order by last name
- Where to Store Custom User Fields
- meta_query key value from array
- LIKE %…% Meta Query
- Querying Email Addresses for a List of Users with Same Last Name?
- Multiple Values stored as array in Meta Query
- Display sortable User meta column in admin panel user’s page
- Order by nested named meta queries with ‘exists’ and ‘not exists’
- Documentation for post meta
- Show User Their Password
- User profile custom field
- Showing user ID on user main page from screen options
- Front end user meta options for users
- Advanced orderby with multiple meta_query
- Arrange Posts By Date In Order Of Closest To The Current Date
- Using get_terms() with meta_query parameters
- WP_User_Query with meta_query array relation ‘OR’
- ACF Upload Image in front-end with custom form
- Extra User Profile Field Upload File / Image
- How can I sort get_users() by any value (last_name, user defined fields and more)
- meta_query problem
- How to add quick edit and bulk edit fields to users admin section
- Custom Upcoming Events List for Events Manager Plugin
- Very slow query with meta_query on large database
- How to use meta_query to check if a meta field has something set?
- Extend the wp_users table
- Hide a user from WordPress
- Drop down list in user profile page
- Check for user meta data at Login
- Query wp_usermeta alongside wp_users
- Upload files programmatically to users
- How to get top 10 user is based on user meta value
- Searchable meta value in user.php
- How to add country drop down menu to the user profile?
- How to exlude posts that have certain meta_value?
- get_user_meta Short Profile Section