User meta data consists of key-value pairs pertaining to the according user ID.

learn more… | top users | synonyms (2)

1
vote
2answers
24 views

How to display current_user bio

I'm displaying the current user's info on the front-end, but haven't been able to locate the correct hook for the bio, other than as an "author" hook. Help?
1
vote
3answers
76 views

Add user data to table when user is created?

I am trying to figure out how to add user information and specific meta data to a separate table through PHP. I would prefer to do this when a user posted to the wp_users and wp_usermeta table. I am ...
1
vote
0answers
13 views

get the taxonomies terms associated with users

I’m building a search form with meta_query to get users based on meta_key and meta_value. Some meta_key are taxonomies. It works very well but in my select, i have all terms and some terms are not ...
0
votes
2answers
24 views

How to update user profile custom fields

I have created custom fields on my registration form, such as 'telephone', using Theme My Login. I have found a way to make them appear in the backend (on the User page) but I can't update those ...
0
votes
0answers
23 views

get_user_meta empty when inside ajax hook

I'm currently implementing a wheel of fortune for a website. I'm storing in a user meta how many times a user has played and other things. When the user plays, it sends an AJAX request which draws a ...
0
votes
2answers
24 views

How to access author data from header action

I am adding a function to the header: add_action('wp_head', 'mine'); function mine() { global $authordata; $avatar_url = get_avatar_ur($authordata->user_email); // .... } But I am getting ...
-1
votes
0answers
45 views

Woocommerce persistent cart on multisite

I am trying to make a global cart plugin for woocommerce. I want to use the details stored by woocommerce in the persistent cart since it is stored as a user meta and user tables are shared across a ...
-1
votes
0answers
10 views

Mailchimp Synch User with custom user_meta to create list

i've a csv file with my clients list that i use to create users with custom meta data (such as language, notes, etc) i'd like to sync those wp users to mailchimp users, dividing it by lists (blocked ...
0
votes
1answer
41 views

Updating meta_value in a custom key

I have a custom meta_key called 'sales' this holds information of all sales a sales person has carried out along with a flag to say if it has been authorised, awaiting authorisation or if it has been ...
-3
votes
1answer
20 views

how to get specific fields from get_user_meta()

I use $data = get_user_meta ( $user_id); to get all data. But only need some fields like gender - city - answer. How can I filter this in get_user_meta()?
0
votes
1answer
8 views

Require confirmation of current user's email before updating database and before send_email_change_email

I like the core ability for users to update their default "Email" field. For example username1 can edit their own profile and change their "Email" field from email1@example.com to email2@example.com ...
0
votes
1answer
38 views

how to get list of all users + there metadata

How do I get a list of all users with role = 'Customers' including all the metadata per user, means wp_users + wp_usermeta. Query below does not generate the wanted results. $query = "SELECT * ...
1
vote
0answers
22 views

Redirecting users based on custom user meta

I am novice trying to use the following code: function my_login_redirect( $url, $request, $user ){ if( $user && is_object( $user ) && is_a( $user, 'WP_User' ) ) { if( 'cool' == ...
0
votes
1answer
28 views

wordpress meta value compare between two date

I want to check date between two year of birth. But my saved value is date of birth. Meta key "birth_date". Now I want to check value between years using year. My saved date format like "01/01/1995" ...
-2
votes
0answers
26 views

How to show all usermeta values of specific key as dropdown

I have created a custom usermeta field in the user profile named key user_designation. How can I show all its values as a dropdown?
3
votes
1answer
57 views

Hide a user from WordPress

I'm using the below code to hide a user from the WordPress User List: add_action( 'pre_user_query', 'ap_pre_user_query' ); function ap_pre_user_query( $user_search ) { $user = wp_get_current_user(...
0
votes
1answer
57 views

Show global Message in User Profiles with admin only Input field in Wordpress Backend

I try to display a piece of text (without plugin) for example "Quote of the day: Some text" on all user profile pages (.../wp-admin/profile.php). This Text should managable/editable from the Profile ...
0
votes
2answers
32 views

Customizing WP tables or adding new ones?

I would like to extend user data, adding picture, department, phone, etc. You may achieve this adding custom fields to the usermeta, however I wonder if this techniques is deprecated and it would be ...
0
votes
0answers
34 views

get selected Option value in Dropdown selection

I want to store some Custom User Meta in Edit User Form. i but i cant get it working :/ Here is the following code add_action('show_user_profile', 'add_extra_berufe'); add_action('...
0
votes
1answer
20 views

Order By Meta_key but convert custom date to Y-m-d first

So I have a meta key called sermon_date. Without having to change the custom post type format for Y-m-d and then editing all of the sermons to have that date....they are in m-d-Y format currently. So ...
6
votes
1answer
246 views

Create custom user role (client) that can create another custom user role (employee) of that client

Bit of a long question, but I do believe this situation will occur for other people in other contexts. Our company needs to create an Employee Assistance Program MU subdirectory network site where ...
1
vote
1answer
29 views

User Last Login Sort Column

I've seen there are several ways to display a user's last login date on the Users page without having to use a 3rd party plugin. Building on that, I'd really like to have the user's last login date ...
2
votes
0answers
36 views

Where to Store Custom User Fields

I've built an enterprise Wordpress site and we are currently designing an automated import of company user data directly into the Wordpress database, so it's not manual. This user data has more data ...
7
votes
2answers
153 views

Difference between update_user_meta and update_user_option

Can anyone explain what is the difference between update_user_meta and update_user_option and in which scenarios the both can be used?
0
votes
1answer
35 views

How to display checkbox meta array values one by one?

By wp user frontend I add some checkboxes to users frontend profile. When I use echo get_the_author_meta('my_pet', $author_id) output is: cat| dog| hamster And when I use this loop code $pet = ...
0
votes
0answers
33 views

Update user meta when user login

I have created a custom field last login time, i want to fill it with last time user login date and time. function fb_add_custom_user_profile_fields( $user ) { ?> <h3><?php _e('User ...
0
votes
0answers
17 views

same users different websites other then wordpress

I am creating a network of sites. I have some wordpress installations as well as some other scripts installations. I know that i can use single wordpress users table for different wordpress ...
0
votes
1answer
28 views

query post by author gender

I'm using utimate member plugin on my website. for each member (author), I have a field to store the member gender. (Homme / Femme). the data is stored in my database, inside wp_usermeta. meta key ...
0
votes
0answers
33 views

Show list users based on two custom field values

I'm kinda stuc. I have added an extra field in the user profile for my authors, called ArtistCategory which can be Tattoo or Piercing. I'm using this key and value to filter for menu and gallery ...
1
vote
0answers
25 views

Allow role to edit users at lower level with only specific metadata

How to allow a custom role, company-administrator, to be able to edit/create/delete users lower than their level, subscriber, where some metadata is matched? To elaborate: I'm making a membership ...
0
votes
2answers
178 views

Gather posts into a cart/lightbox and share with another user

Ok I've almost completed a Wordpress site that is a multi-user Image Library. This is a private site, where users must be logged-in to view it. The average user cannot get to the backend (wp-admin) ...
0
votes
1answer
30 views

The Simple and Correct Way to Add User Meta

I want to give points to users to their activities like writing posts, writing comments, etc. I thought to use user meta to store points. I know that I can use add_user_meta... But the problem ...
0
votes
0answers
122 views

How to show twitter link preview (Card View)

I want to ask about my problem. I can't show twitter link preview for my website and for information, I just add this code i get from WP Beginners <?php #twitter cards hack if(is_single() |...
4
votes
2answers
51 views

Building a scalable Wordpress favouriting plugin - one serialised meta value array or many meta records

I am trying to build a simple Wordpress favourite post plugin that is scalable and could handle 1000s or 10000s of users or more. There are several different approaches that I have seen in other ...
0
votes
1answer
34 views

Getting a users username in get_user_meta

I am getting people's first and last names this way: $_UFName = get_user_meta($_uid, 'first_name', true); $_ULName = get_user_meta($_uid, 'last_name', true); where $_uid is the persons id I ...
0
votes
1answer
70 views

Save buddypress xprofile data to author meta

I have created a buddypress extended profile field "description" and would like to save the data entered to the "descripion" profile field of the user (DEfault wordpress Biography description field) ...
0
votes
1answer
22 views

Users are required to login to my site. How define user.member boolean, its permissions, and conditionally display/handle behavior based on it

Users are required to login to my site. They are redirected to the login page and not allowed past the login page until they authenticate. Once authenticated, they can access most of the website. ...
0
votes
3answers
95 views

Updating user meta on save post

I have a custom post type called 'programmes' that details seminar information. Using a form visitors to the site can signup to a specific 'programme', once they have completed the form a new user is ...
0
votes
1answer
49 views

How to add custom detail page for a Subscriber at Admin Panel

I have created a custom page which shows the list of Users(Role = 'Subscriber'). I named this page "Reporting" & It is based on wp_list_table. Now I want to show the user details (having custom ...
1
vote
0answers
57 views

Customize Avatar using user meta

I have a customer where all the users are synchronized through an API every night. This API gives me the profile picture for each user and it is stored as a user meta with meta_key = 'image'. Is ...
0
votes
1answer
31 views

Creating multiple profiles under one user to assign to particular posts

I am working with WP Job Manager at the moment quite a lot and currently on each job you would like to post you enter a set of details about the company the job is with. This info is then echoed out ...
0
votes
1answer
39 views

UserMeta Changes Meta Value for Post ID

I am building a proprietary LMS(learning management system), and am attempting to add a simple bookmarking function that saves the $post->ID for the last page visited within my "course" CPT(custom ...
0
votes
0answers
83 views

ACF - Update User Meta Checkbox Values

I am using ACF and I have extended the user profile so it includes additional textboxes and checkbox values. On the frontend the user can update their user profile which is working as follows:- <...
3
votes
1answer
66 views

Can I count the number of users matching a value in a multiple value key?

I'm trying to find the number of users having a certain value in a custom field. The problem is that this custom field allow multiple values. This code works well when the meta_key allows only one ...
0
votes
0answers
19 views

wordpress query between zipcodes not working

Ok, I have this code that checks for zipcodes in the database, normally I can simply do a between query, but the zipcodes are stored in the following way: zip_code::2025 (meta_value in the usermeta ...
0
votes
0answers
20 views

Add wordpress category id to user meta with button

I want to know which categories my users are most interested in so I want to add a button to categories theme so if they click it that is saved to user meta. Similar to this: Let user subscribe to ...
0
votes
1answer
93 views

Upload files programmatically to users

i'm using pods plugin to add new custom fields to user so i added 4 files custom fields and then trying to upload files to this fields from registration page and create new user but when i upload the ...
1
vote
1answer
91 views

Creating a custom post type upon registration

I'm struggling to find the best/quick easy solution to this problem: I have a plugin that creates companies but stores all of the company info as a user so all information is in the user's profile. ...
1
vote
1answer
221 views

Update user meta using with ajax

I want to edit user meta on the front using an ajax form, this is what i have: The form has the user ID: <form id="<?php echo $current_user->ID; ?>"... This is the script:: <script&...
1
vote
2answers
46 views

Wordpress SQL Issue not returning correct reselts

So, I have been working on an SQL query involving the users and usermeta tables in wordpress. I am not getting the correct results. I have the following query written SELECT * FROM ...