I haven’t touched user functions so far, but according to the codex, should look something like this.
$args = array(
'meta_key' => 'g300',
'meta_value' => ','
);
$users = get_users( $args );
EDIT
This assumes that all the users with the field unchecked have a comma value ( for example, it won’t work if the value in the DB is empty ).
Example 2
$args = array(
'meta_key' => 'g300',
'meta_value' => 'I will attend the G300 class,' //Was the comma intentional? If not, remove
);
$users = get_users( $args );
if( !empty( $users ) )
{
foreach( $users as $user )
{
echo $user->display_name; //name
echo $user->user_email; //email
$meta = get_user_meta( $user->ID, 'is_700_a', TRUE );
echo $meta; //the meta field value
}
}
Related Posts:
- custom avatar removal
- How to query an out put value?
- Searching with Multiple (Parallel) Criteria on Custom Fields?
- Save custom field types with this function…?
- select user with all meta field and field value. I am use Below Query for this ,So any of know another way to fast query instead of below query?
- Is it possible in WordPress
- How to add a prefix to existing custom fields over MYSQL query?
- How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?
- Add validation and error handling when saving custom fields?
- Meta Query with AND & OR?
- Add custom objects/entities to WordPress
- Can I count the number of users matching a value in a multiple value key?
- How to get users by a custom field / by user meta data?
- Adding another state (spam, reject, approve) to wordpress comments?
- How do you add a custom option to user data?
- Filter results with custom field values and dropdown
- Is there a way to do multiple ordering on a multiple meta_query?
- Show User Their Password
- generate unique number when registering a user
- How to show custom field’s value under post/page title in wp-admin
- Adding Properties to User Profile and Displaying in List
- ajax delete value from custom field array
- How can I sort get_users() by any value (last_name, user defined fields and more)
- How do I read the value of a custom field of the page?
- Displaying additional User Contact Information
- get_post_meta in sitewide tags plugin fails to return value for custom fields
- Best way to add custom / magic / flutter fields into RSS feed
- How do I query for a post by custom field?
- Insert attachment ID in custom field from media uploader
- meta_query for a string inside a meta field containing a comma-separated list
- Upcoming Event: How do I sort database by custom date field, but ignore past dates?
- Delete all custom fields at once?
- How can I sort homepage by a meta value?
- Buddypress Add unserialized Profile Fields in Members Loop [closed]
- Conditional custom field query
- How do I create a column in Users list and display user data from custom registration field
- Display only past events on that page using Visual Composer Grid Bulider
- WP_User_Query pulling ACF to loop
- Better Method for Multiple Meta Boxes
- WP 3.1 meta_query for multiple custom field values
- Send email with custom fields after new draft is saved or new post published
- How to add upload video option in wordpress for user?
- Passing args to WP_User_Query am I using meta correctly?
- How do i add custom fields to my themes template file?
- How to save the date/time of last update of an extra user profile field?
- Trying to reorder posts by custom field
- Show image if author meta (profile fields) exists outside loop
- Check & remove special characters in a field?
- List custom queried terms in the edit-tags.php?taxonomy page
- ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?
- How to add fields in custom registration form, validate it and aave to db? [closed]
- check for duplicate user meta data before updating
- Is there a way to set default custom fields when creating a new post?
- Increment user meta data by 1 each time a page is visited
- Front-End User Profile
- Get emails from users by custom field SQL
- award points to a user each time they update their cpt post
- How to update user profile custom fields
- Loop through incrementing custom fields
- How can I output the custom fields wrapping with HTML
- custom user meta query
- How to get all custom fields with some prefix in key?
- WP-eComerce Advance Meta Tag data in descending order [closed]
- Meta Box Plugin Cloned Fields – Multiple Foreach values
- How to query for posts with either one or another custom field
- Custom Query: query by post custom meta data
- How to query posts by month based on date custom field?
- Custom field bug in WordPress 3.2
- Adding re-type email and check it if the email match
- Odd functions.php issue in WordPress
- Counting post fields
- Display Additional Info
- Populate custom checkout fields with data from previous orders
- User query – getting values for custom meta keys/fields
- Problem with revisions only returning four results
- Search & column order by meta value in admin
- How to get data from user meta custom fields created with acf-pro plugin?
- How to save multiple values with same meta_key, each value linked to another tag id
- searching by keywords in post’s metas or pagination links problem
- Getting user’s data, by custom field lookup (meta)
- Redirecting to an external URL
- Create custom query for search?
- update_user_meta(): invisible data storage
- Delete custom fields on post publish?
- When post is updated, custom metadata in text area field is overwritten
- Adding custom fields to images
- custom field functionality
- How to add an option to admin to add image that could be used as header?
- Show or hide lang=”ur” in main element
- Using Hooks. Thematic
- Adding thumbnails for non-image attachments
- Custom field in a shortcode?
- I would like to display different text on different pages
- How to check if custom field exists in this widget query
- Only show content slideshow if “slideshow” custom field exists
- Add image custom attribute [closed]
- Check if a field is capitalized?
- Can’t sort custom column on user.php by number / meta_value_num?
- How to display search query as formatted text?
- Problem display