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?
- Validating Custom Meta Box Values & Required Fields
- Is there a way to set default custom fields when creating a post?
- How to rename a custom field?
- How can I make wp-pagenavi work on a custom query built upon a form submission? [closed]
- 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?
- Save custom user meta on registration
- 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?
- Edit Custom Database Tables in WordPress
- Filter results with custom field values and dropdown
- Meta keywords and descriptions plugin for manually editing meta for each page/post
- Making a configurable field translatable
- Is there a way to do multiple ordering on a multiple meta_query?
- Check before publishing, if already exist post with current custom field value
- Show User Their Password
- How to customize default wordpress editor?
- generate unique number when registering a user
- How to update serialized data in the user meta data
- Custom Fields Bulk Edit
- Custom Page Template [closed]
- How to make custom comment fields required and message field not required
- Problem in custom meta boxes
- How to show custom field’s value under post/page title in wp-admin
- Multiplile values checkbox or select in custom meta box
- 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?
- how to save multiple custom fields for a post in one go?
- Displaying additional User Contact Information
- get_post_meta in sitewide tags plugin fails to return value for custom fields
- get_user_meta Short Profile Section
- Plugin similar to Taxonomy Drill-Down for custom fields?
- Best way to add custom / magic / flutter fields into RSS feed
- How do I query for a post by custom field?
- Separate table or usermeta
- Insert attachment ID in custom field from media uploader
- Count how many posts have a custom field set
- meta_query for a string inside a meta field containing a comma-separated list
- How to update custom user meta field in wp?
- How do you create dynamic customised sections in WordPress?
- Upcoming Event: How do I sort database by custom date field, but ignore past dates?
- Delete all custom fields at once?
- sort search results by custom fields using dropdown
- How can I sort homepage by a meta value?
- Buddypress Add unserialized Profile Fields in Members Loop [closed]
- Loop to display random posts only if a custom field matches category
- WordPress User Profile Upload – If page is saved file reset
- Conditional custom field query
- ACF: How to get the full field name (meta_key) by a field key?
- 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
- How to save multiple options from a dropdown in user profile
- Custom Field Create Bulk via SQL Query
- Create Pop-Up Box with Custom Field Content Inside the Loop
- WP_User_Query pulling ACF to loop
- Users Select inside custom metabox
- Better Method for Multiple Meta Boxes
- Displaying a checkbox array from advanced custom field
- WP 3.1 meta_query for multiple custom field values
- How to make condition, based on custom fields value?
- How to select posts from multiple categories and metavalues?
- Sort custom field by post
- Is there any way to get all meta and standard columns for any WordPress object after searching based on meta key and value
- Send email with custom fields after new draft is saved or new post published
- Order RSS content by an advanced custom field value
- How to add upload video option in wordpress for user?
- Passing args to WP_User_Query am I using meta correctly?
- Alter main archive, to show posts with meta as last
- 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?
- Custom tables or custom fields?
- Post selector as Custom Field
- Trying to reorder posts by custom field
- Limits, not all post are showen when querying for posts by view count
- Why orderbyb meta_value_num won’t affect the generated SQL Query order?
- I need a “Choose from existing content” popin
- For homepage images (for small business website), is it better to use custom fields or post_thumbnail?
- Get post ids sorted by meta_key
- querying a custom field
- pre_get_posts : only get posts by wp_usermeta value
- How to remove custom fields from the selector?
- Query post by date (stored custom field meta as yyyymmdd) and differentiate across 12 months
- Show image if author meta (profile fields) exists outside loop
- How can I hide custom field from users used for caching response from external api?
- Check & remove special characters in a field?
- Let’s Create Custom Field Template Documentation
- How can I combine this php statement to get the results of multiple variable inputs?