First, always var_dump()
something if you aren’t sure what exactly you got. If you ain’t got XDebug installed and configured, just use
printf( '<pre>%s</pre>', htmlspecialchars( var_export( $dumpMe, true ) ) );
which will bring up an equally informative response.
About the WP_User_Query
) IIRC it returns objects which are instances of WP_User
. You can test that with
$user instanceof WP_User AND print 'Yes, I am a WP_User object';
If that is the case, simply use
var_dump( get_user_meta( $user->user_id ) );
and you should be fine. Btw, there’s no real Author Meta.
Related Posts:
- create shortcode to list users with specific meta key value
- Adding fields to the “Add New User” screen in the dashboard
- Execute a ultimate member action when user role is updated
- How to add array [closed]
- User meta and public function security
- How can I show different content for different user-levels?
- Custom user role still showing up after deletion, ideas?
- Add Change role button for list of user in an event
- Add another role to a user when they click a button?
- delete_user_meta for user in spesific group
- Get author meta of all writers
- How to check if a user exists by a given id
- Use author author display name in permalink structure for pages and posts
- Check if user is admin by user ID
- Get a list of all available fields in the User Profile
- Logout redirect to current page – function
- How to paginate the get_users function?
- Grouping users under parent user
- How to display random users with avatars
- How to manually activate user in dashboard only by admin
- Apply custom role capabilities to administrator (without plugin)
- Add new user : make the fields First Name and Last name required
- \WP_User Object | What’s the Difference Between {caps} and {allcaps}?
- Roles & capabilities GUI that does not create separate table
- wp_delete_user with username
- Change labels on ‘Nickname’ and ‘Biographical Info’ in user-edit.php
- Order get_users() by last login date. Is it possible?
- Authors details such as social media links, emails etc → Is this Meta or something else?
- How can I tell when a user is logged in?
- How do I redirect upon login a specific user based on role?
- how to get and display logged in user’s recently read posts
- Displaying a random user with a shortcode
- How to update BuddyPress xprofile fields programmatically? [closed]
- How to detect first visit of a user?
- How to add another user to this remove_menu function?
- Add a new subscriber role using a function
- Can I pass two roles to the function get_users?
- How can I add an image field to BuddyPress Extended Profile Fields? [closed]
- How to test for Super Admin
- Create dropdown of users in admin dashboard
- Custom roles can’t access to wp-admin
- password protected post policy
- Search user metadata with checkboxes via ajax (almost working)
- Showing user profile data on front-end
- Function that prevents users from uploading photos more photos
- Modify function to only return values for the user that’s logged in
- Function to pull data from user meta not working
- loginout function customization
- call wp_insert_user in custom class doesnt work
- Assigning multiple or additional capabilities to specific users or how to create additional roles like bbpress roles?
- how do I add role and capability after I create a new user
- Show errormessages on wrong username/password on custom loginform?
- Uses for function: wp_update_user
- referencing the current user in a page i created in wordpress
- Message notification for user
- Show metadata in users.php – wordpress
- Allow a user or role to view drafts and previews, but not other admin privileges?
- How to load a css file depending on the current role
- Update user role for expired membership
- Allow user select role in wordpress default registration without plugin
- Deleting guests profile users after 1.5 hours
- Remove check boxes and its label from screen option for custom role
- wp_get_current_user return ID = 0 when used outside of wordpress, such as webhook / fulfillment dialogflow
- Allow user only create specific tags
- get_current_user_id() always return 0 in if else statement
- Hook into add_user_role and update based on new and removed roles
- How to Moderate Edits to User Profiles?
- How to show only specific category post by user role without plugin and restrict all other cats
- Display current user metadata on WordPress page
- wp_get_current_user Not working
- Auto copy value from specific user meta field to another field
- Change user role based on total number of items ordered
- Remove all video attachment, both files and post/postmeta from database?
- Show users last read posts for each user?
- In admin manage users page, how can I stop users with certain privileges from editing users with other privileges?
- Change the second role depending on the first
- Restrict certain roles registrations by domain
- Private messaging – Getting and displaying the avatar/url of a message recipient
- How to add number to wordpress count function?
- Multisite Admin Roles
- How can I include user meta information in the resulting array of a WP_User_Query?
- add_role menu pages are not visible
- update_usermeta don’t work
- How to Update User Meta Field other than from profile?
- Dynamically Generating User Meta Field
- Display and Allow users to edit their own profiles
- Creating Custom user type just like custom post
- get USER ID in functions.php using user_register action
- Welcome Mails based on user role
- Extend user search in the users.php page to allow for searching by role and excluding specified email domains from the “users search” input box
- Whats the proper way to add a new user via a front end form?
- User’s Comments Number: Storing it in a meta field for different uses
- Get all users from role and add to dropdown (select) – wordpress, javascript
- Custom Admin Menu Report for Specific User ID
- sort by date in users
- Would it be possible to disable embeds for specific user roles? If so, how?
- How to make my logged-in user-role shortcode displaying name instead of slug?
- Custom User Role not working
- Add custom css to specific user
- Sharing website link shows author name but only on GROUPME