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
- How to paginate the get_users function?
- Grouping users under parent user
- How to display random users with avatars
- 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}?
- wp_delete_user with username
- Change labels on ‘Nickname’ and ‘Biographical Info’ in user-edit.php
- Authors details such as social media links, emails etc → Is this Meta or something else?
- How do I redirect upon login a specific user based on role?
- how to get and display logged in user’s recently read posts
- 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]
- 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)
- Remove the deleted users avatar from list
- Hide Author.php template from specific user role
- edit role display name and label name without plugins
- How to add custom fields to my custom registration form
- Calling a function from anywhere, used in different places
- Don’t delete a page if it holds users
- Toggle User Roles with button
- Last Login in number of days format
- How to change or add user role after getting post request data about pay? [closed]
- How to make custom column Admin>Users sortable?
- Updating wp_user_level on user update
- Filter out other users comments. Visualize only own comments and editor role users’ comments
- Why is functions.php file in child not initializing and over-writing parent?
- Force to use STRONG users password and implement rule to prevent REUSE [closed]
- Change label for registration Fields
- Users create/join groups
- Allowing users to view private posts (pending approval)
- is_author(get_current_user_id()) returns false when author id and user id match
- Allow Contributor to edit their own posts after Adm aproval
- How to get data from an array using get_user_meta()
- How to add custom JavaScript in functions?
- Condition OR for current user ID
- How to set default post editor based on role?
- Adding an option to a shortcode
- How to Use Global Variables Inside Header and Footer
- Secondary Menu and Logged In Users
- load CSS only for administrators on backend
- Shortcode for Listing Users from Meta Value?
- Filter to wp_list_authors
- Need To Change WordPress Meta Tags… Includes wordpress shortcodes
- Add Link to Users List (Backend) to open each users front-end profile
- Suggest Users basing on User taxonomy
- wp_usermeta – Read from database, but save function broken
- 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
- 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?
- 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
- 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
- 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
- get_current_user_id() always return 0 in if else statement
- 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
- Change user role based on total number of items ordered
- Remove all video attachment, both files and post/postmeta from database?
- Change the second role depending on the first
- Restrict certain roles registrations by domain
- 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
- Dynamically Generating User Meta Field
- Display and Allow users to edit their own profiles
- Creating Custom user type just like custom post
- User’s Comments Number: Storing it in a meta field for different uses
- Custom Admin Menu Report for Specific User ID
- sort by date in users