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

learn more… | top users | synonyms (2)

0
votes
0answers
8 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
19 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 ...
0
votes
1answer
19 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
22 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:: ...
0
votes
2answers
35 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 ...
1
vote
0answers
15 views

Update user profile information from functions.php

I have the following function in my functions.php file:- function apply_for_job() { $job_id = $_GET['job_id']; $user_id = get_current_user_id(); $prev_value = get_field('applied_jobs'); ...
0
votes
0answers
17 views

get author id outside loop for posts showed by shortcode in a page

i have a page (like: site.com/PAGE), and this page address will display all posts from all authors(posts are custom post type). if address contain the author slug like: site.come/PAGE/USER, display ...
0
votes
0answers
17 views

Textarea is not displaying user data

I am trying to make a form which is editable by user and if the user already added some text it should show that. Once user press submit button, text should be replaced with new text which is input by ...
1
vote
1answer
27 views

How to display user's avatar on their profile page?

I'm trying to figure out a simple way to display the user's avatar on their profile page. It seems like it would be a very simple thing to do, but I can't figure it out. Is get_avatar(); not the right ...
0
votes
1answer
33 views

Query posts based on the meta key values of logged-in users?

I searched in WordPress Codes, and all of the online forums and tutorials about this but could not find any relevant solution. What I am trying to achieve is to create a query that lists posts for a ...
0
votes
1answer
13 views

Save editor's value in user meta and retrieve it

I am making user meta fields. I have to implement a field named business_profile and implement editor on it. I have implemented the editor but I can't seem to either save its value or retrieve it. ...
3
votes
3answers
136 views

How to filter users on admin users page by custom meta field?

The Problem WP appears to remove the value of my query variable before it gets used to filter the list of users. My Code This function adds a custom column to my Users table on /wp-admin/users.php: ...
0
votes
1answer
24 views

Buddypress avatar image in database [closed]

I want to get path of buddy-press profile pic directly in database to be used on other then word-press platform but i am not able to find it in database.. because i can't use buddy-press functions in ...
1
vote
1answer
45 views

Display user meta by different user role

I have added in my functions.php child theme some user meta and works no problem, but I need to display this data only inside a user profile with a specific user role named "rivenditore" and if is ...
0
votes
1answer
21 views

Update another users meta

I'm using gravity forms and have a fairly extensive profile for each user. They are able to add 5 other forms of data to their profile/user meta. My users are able to send an email to a non user and ...
3
votes
1answer
40 views

Issue with foreach on duplicate meta_key's

Im storing using add_user_meta custom values that get sent to the front page of the website. Here is the php code. $user_query = new WP_User_Query( array( 'fields' => 'ID' ) ); ...
4
votes
1answer
43 views

Grouping users under parent user

What it needs to be like: one "super user" with user role company normal users with user role employee I don't want "super user" to be able to have more capabilities, especially admin-like ...
3
votes
1answer
44 views

How to get last login Access Date and time

I have seen similar question Here at First and Second. But these two are not close to my code. Let me show my code here. add_action('wp_login', 'set_last_login'); //function for setting the ...
0
votes
1answer
22 views

delete_user_meta Delete one value out of array

The code I have is not working cause the value saved as array and I'm not sure how to fix this. // Remove favorite authors from current users DB function fav_author_remove_user(){ ...
0
votes
1answer
21 views

update_user_meta add value on the top on existing value

I'm working on a plugin that will allow people to favorite authors on WP site. When you click on Favorite this author button, it will send author ID to below function and save that value in DB. ...
0
votes
1answer
26 views

Querying users by meta value and getting a strange answer

Here is my case: I am trying to get all users with some value related to a specific meta key. In other words, I don't want to select users that have nothing on that meta key (mps_finalDate). So here ...
0
votes
1answer
32 views

Checkbox not showing as checked on UserProfile (even with checked=“checked”)

I have a dynamic list of checkboxes that are showing on a user profile in the admin area (user-edit.php). A user should be able to select the checkboxes which will save their selections as an array ...
0
votes
1answer
66 views

How to change user role using hook

I have created some custom user field , so i can manage my users as dealer in my website . Now my problem is with that user role , i want to make something in my function.php to check if my custom ...
0
votes
1answer
55 views

How to echo billing phone number under My Account in Woocommerce? [closed]

We're wish to get customer's billing_phone number & then put it under "My Account" or "My Address" section. This way, our billing support can look up for a number to call from the front-end, w/o ...
0
votes
1answer
19 views

Store extra user values permanently

I need to store an extra value for users. I have made an extra field on the users page and on the "add new user" page. When adding a new user the extra value is stored using "update_user_meta": ...
2
votes
1answer
140 views

What is rich_editing?

I wanted to learn more about shortcodes with button implementation since I do not use them much and I have been doing a lot of research on the topic and the questions and tutorials I run across use a ...
0
votes
1answer
42 views

Show number of posts by logged in user

How to display the number of posts written by the logged in user. Here is what i got from the codex so far <?php echo 'Number of posts published by user: ' . count_user_posts( 5 ); ?>
0
votes
0answers
7 views

How can I create a search field that includes user meta?

I have a site with a number of users with a bunch of custom fields in the user section. I need those fields to be searchable by a user visiting the site. I'm not an experienced web developer but I ...
1
vote
2answers
47 views

How to get top 10 user is based on user meta value

I'm trying to get top 10 users in my wordpress blog based on user meta value. I've tried few methods & finally able to get just top one user using below wpdb query. But clueless, how we can get ...
0
votes
1answer
58 views

Updating user meta

I'm struggling to figure out to get the code to update a single current user meta. For instance if I want to update their first name automatically. I'm using $current_user = wp_get_current_user(); ...
0
votes
0answers
13 views

Globally Change Name of User Profile Fields

I am trying to globally change the name of user profile fields or add new fields to the users' profile (whichever is easier and takes less resources). I tried using something like: add_filter( ...
0
votes
1answer
41 views

How can I sort get_users() by any value (last_name, user defined fields and more)

I want to sort the result of get_users() by last name, first name, user defined fields or whatever. How can I achieve this while still using get_users()?
0
votes
1answer
64 views

wp_usermeta - Read from database, but save function broken

I added a custom field to the profile-page of WordPress users called "uidnumber" and it reads values from the database just fine, however it just doesn't save anything. I'd rather save it in ...
0
votes
2answers
37 views

How do I change the user via SQL?

I change a user via SQL in wordpress: SET @old_user='old_user'; SET @new_user='new_user'; UPDATE wp_users SET user_login = replace(user_login, @old_user, @new_user); UPDATE wp_users SET ...
0
votes
1answer
17 views

get users nickname uploaded media

I want to get the users nickname who uploaded a media file. I'm getting all media files with this code and want to link to the users nickname / profile <?php $args = array( ...
0
votes
0answers
16 views

How to Create Click Counter -User Meta-?

How can I update current user's score? What am I doing wrong? Here is my code: <form action="" method="post"> <input type="submit" value="click me!" name="clicks"> </form> ...
0
votes
1answer
11 views

Add method for tracking who referred new users

A client wants me to make somthing like user genealogy. It would work as follows: each user has a page that only they can access (or one page that loads from logged-in user) and on this page they ...
0
votes
0answers
33 views

How can checkbox be added in admin users list be made editable in edit profile page and save value as checked and unchecked?

Here is my code in functions.php function X_member_user_table( $columns ) { $columns['dbem_X_member_f'] = 'Discount'; return $columns; } add_filter( 'manage_users_columns', ...
0
votes
1answer
66 views

Edit Account - read and write to MySQL

I have user data that's being saved to and read from the database as they are all standard WordPress fields. example: $user->user_email And here's the code I have inside the ...
0
votes
1answer
104 views

Wordpress /users/me endpoint request forbidden

Using Wordpress's plugin WP REST API version 1, there is an endpoint called /users/me which response with data for the currently logged-in user. When I requested /users/me I got 403 Request Forbidden ...
1
vote
1answer
113 views

Admin user edit - Grab newly submitted user meta immediately after update/submit

I am trying push user update fields to an api via user profile edit or admin user edit. I have successfully allowed user to update their own profile and have it also update the remote api with same ...
1
vote
0answers
22 views

How to query users by meta value, even when meta key doesn't exist?

The problem is that users for whom votes_total doesn't exist are getting skipped. See below: $args = array( 'meta_query' => array( 'relation' => 'OR', array( ...
0
votes
2answers
45 views

Redirecting to an external URL

I want to add a URL on my website. Something like website.com/drive_folder When someone presses that link (and he can only see it on a page when he is logged in), it will send him to a Google Drive ...
0
votes
2answers
74 views

How to get its meta_value of a specific meta_key within wp_usermeta

Using the S2member plugin, a meta_key for the last-payment-time is automatically stored in WordPress DB under table wp_usermeta (custom field is called wp_meds2member_last_payment_time). From ...
1
vote
0answers
44 views

Hook or action to save profile fields at specific time

i want to make a field in the user profile to know who added this user, the problem is that this field displays the current logged in user, i wonder if the is a hook or action to make this custom ...
2
votes
1answer
280 views

Query users by custom taxonomy and user role

I'm trying to make a query for users using WP_User_Query() I need to filter users by role shop_manager and custom taxonomy called shop-category and current taxonomy term ID. The code I have so far: ...
0
votes
1answer
28 views

Find matches of a variable in custom usermeta

I have variable $var which is dynamic. I want to find if there are any matches of this variable in custom user meta - "authmeta" and return the user_id of the corresponding entry if any matches are ...
0
votes
0answers
19 views

How can I develop a plugin for Rating Authors?

I am well familiar with plugin development in WordPress and have an understanding of user_meta. I was trying to find a way to find a plugin to rate user_type:"Authors" but could not find.
0
votes
3answers
34 views

Need help getting a certain value out of a multi dimensional array

I'm looking to retrieve a specific meta value for users from the Wordpress types plugin. I know the value is stored in a wpcf-team-experience-member-type. This is a checkbox option and I'd like to ...
0
votes
1answer
73 views

update_user_meta adding new rows in db for same key

I have added new user meta for a given user. Let's call it title. Every time I run $user = get_user_by('login',$username); update_user_meta($user->ID, 'title','Manager'); The meta is not ...