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

learn more… | top users | synonyms (2)

2
votes
1answer
303 views

update_user_meta doesn't work with AJAX

I try to keep user subscription in a metadata var. The function is called by AJAX. Ahe AJAX is called but the metadata does not seem updated on frontend. Here is the code: jQuery <script ...
1
vote
1answer
21 views

WP_user_query throws a 404 error

I'm trying to get Wordpress (3.9.2) to search meta_key's in usermeta. I have tried every example provided on every site I've searched but I keep getting redirected to the 404 error page. I've tried ...
1
vote
1answer
102 views

Lock user information once fields have been filled in

Much like the username is locked down and cannot be changed once it has been registered, I would like to lock down additional fields I have created with Advanced Custom Fields like the person's ...
1
vote
1answer
126 views

Memory usage for scalable usermeta queries

Problem Some time ago I posted a question about the scalability of wp_usermeta architecture: my concern, as my client's database of users is growing fast, is now the memory usage of querying the ...
0
votes
1answer
38 views

Custom Meta Boxes and Fields for WordPress: Change directory upload based on user-edit page

I have already published this on StackOverflow, but I realised it would be better to post it here instead. I am using the CMB script (Custom Meta Boxes and Fields for WordPress) for uploading files ...
2
votes
0answers
80 views

Content hooks vs User hooks

This is more of a theory question than a question with a direct answer. I've been working with different actions for firing functions when a post is updated or deleted and when users are updated or ...
1
vote
0answers
71 views

How to save the date/time of last update of an extra user profile field?

I have a function that adds and saves very well an extra field to the user profile. But, because the content of this field gets old very quickly, I need to know when the user refreshed it last time - ...
1
vote
0answers
134 views

Frontend Image Upload

I have the following code used at the top of my front end user profile page, everything works and displays fine except for the following problem .... If I upload an image and submit the form usermeta ...
1
vote
0answers
320 views

Wp_User_Query not sorting by meta key

I'm trying to list users sorted by a meta value. I store a score for each user in their user meta which is just a number but the loop isn't sorting. I include the score in the loop so that I can see ...
1
vote
0answers
90 views

How can I make the user names of commentors clickable links to the user's profile from the admin comment screen?

I've set up my wordpress blog to only allow logged in users to leave comments, but I need a way for the administrator to be able to go to a user's profile from the comment moderation screen. I don't ...
1
vote
0answers
2k views

Extra User Profile Field Upload File / Image

I have been following the following tutorial to try and an upload form to the user profiles. ...
0
votes
0answers
19 views

How to operate two wordpress databases simulataneously?

I am having a situation, where i have two wordpress sites. One is for saving the data and content and other is for showing the data/content. Now the situation is, i want a user to register on one ...
0
votes
0answers
43 views

Get User ID on registration form before submit

I am creating a registration page and not using the wp-register page. Is it possible to pre populate the username field with the user id the person will be assigned with? So the username field will ...
0
votes
0answers
25 views

Storing user meta as an array, empty array index shows as “Array” on front end

I am storing user meta data as a single entry in the DB as an array. If any of the array index values are empty, when I display the empty data it shows up as "Array". In particular in my user update ...
0
votes
0answers
12 views

User meta conventions / name registry, for social media links

The Yoast WordPress-SEO plugin adds some social media links to user_meta: function update_contactmethods( $contactmethods ) { // Add Google+ $contactmethods['googleplus'] = __( 'Google+', ...
0
votes
0answers
17 views

Role Column Sorting

I'm trying to add sorting on Role column on user listing by desc and asc but I can get it work, it always show "No matching users were found." below are my code add_filter( ...
0
votes
0answers
44 views

UPME Known Issues - Unable to Save Custom Fields

When you have large number of custom fields, there are issues with saving and updating process. This is due to the maximum input variables constraints set by PHP. Currently you have to increase php ...
0
votes
0answers
60 views

Create a dropdown list displaying users meta data

I want to display a dropdown list of users using information from the wp_usermeta table. I know that there is a method wp_dropdown_users that outputs a select list of users but I can't figure out how ...
0
votes
0answers
8 views

Default Custom Field User Data

I want to create a user meta that would either add or update In the user meta there are two custom field 'projects' and 'amount' so if user donated $1 to project A the user meta will create a row, ...
0
votes
0answers
31 views

User management missing after migration to new host

I just moved my WordPress 3.9 site to a different host by making a mysql dump and restoring it on the new server and uploading the files over. Pretty standard. However, now I've lost the ability to ...
0
votes
0answers
38 views

Add custom field for author and show list author order by that field

I am using variables $author_like_count to count like from all post of author. $author_like_count = $author_like_count + get_post_meta($post->ID, 'like_count', true); My question : How to set ...
0
votes
0answers
20 views

How to Log User Clicks on Link - CPT, User Meta, other?

In the sidebar, I have links that appear when a user is logged in. The links point to downloaders on various other sites as well as our own. I'd like to be able to log those user clicks so I can see ...
0
votes
0answers
42 views

Join wp_users and wp_usermeta

I have a custom user meta named created_by, which is the ID of creator of this user. I want to create a view table like this for example: ID user_login created_by 2 andi admin How to ...
0
votes
0answers
45 views

Update_user_meta fails with ajax when used multiple times quickly

I'm trying to update the status of the sidebar (visible or hidden) when the user clicks the hide/show button in the user_meta so that no matter what computer he's on, he'll see his settings saved. ...
0
votes
0answers
58 views

wp_usermeta key problem

I am trying to add a meta key to wp_usermeta but it does not work at all. The key would get value from a checkbox. I used the code from Wordpress codex tutorial and it's not adding anything. I will ...
0
votes
0answers
56 views

get_the_author_meta not working when sending emails

I can't seem to get "get_the_author_meta" working when sending welcome emails to users. I want to customize the content based on custom user meta. I can pull it in just fine on the front end, but I ...
0
votes
0answers
29 views

Adding a function-based search to the Users admin page

On the Users admin page, I want to add a function-based search criterion. By default, there are filters to search by user role and there is a search box that searches the user data. I would like to ...
0
votes
0answers
47 views

Use and get custom user metadata

I wanted to check if a post custom field matches the logged user's custom metadata. If it does then list only posts that match. I think that's possible.
0
votes
0answers
13 views

Add_action not updating user_meta when trashing multiple checked posts

I have a point system to my wordpress theme. I've recently added a function that removes one point from the member if I remove their post. However, when I check and remove multiple posts in the ...
0
votes
0answers
78 views

get_userdata() not working in my plugin

i am using get_userdata() function in my plugin but it is not showing any values, it is showing blank result. I am able to see the value present in phpmyadmin. I am using it in a plugin ...
0
votes
0answers
382 views

How to Update User Meta Field other than from profile?

I have created a dynamic meta field that is generated for each post type. I used the following to create the meta-field: <?php $args=array( 'post_type' => 'Course', 'status' => ...
0
votes
0answers
54 views

User Meta not Updated?

I've gone in and give custom meta fields for the users in the database, and have assigned all the appropriate values to them. I also have a page set up with all of the users being displayed with the ...
0
votes
0answers
543 views

Update user meta using Ajax on front end?

I would like to update some user meta information from the front end of a WordPress page when the user clicks on a button. I am attempting to pass along a string of data, and then updating the field ...
0
votes
0answers
74 views

WP_Query with intersection of post meta field and user meta field

On the site I'm building, each post has a serialized array of strings. Let's say post ID 1234's value for my_site_teams is array( 'Chess', 'Cheerleading', 'Football' ). Each user also has a ...
0
votes
0answers
37 views

Is it possible to make custom columns in the user.php file to be sortable based off meta values?

I've googled around and not seen any answer that really works so far so I thought I would check and see what others say. I'm working on a plugin that adds three different columns filled with meta data ...
0
votes
0answers
185 views

Edit profile custom fields display

I have function which shows additional info on edit profile page (just text no input fields). Problem is it works only for user_login and user_email - doesn't work for custom fields (fields are from ...
0
votes
0answers
74 views

Perform a function to create/delete custom post only if certain user meta checkbox is set to true

I have a website where I would like all subscribers to be able to create or remove a post that says they are accepting new patients (they are doctors) by checking or unchecking a custom checkbox that ...
0
votes
0answers
24 views

Calculation for each custom post type

I have a code looking like something like this: (It calculates number of registered members for each course) foreach($courses as $course) { global $wpdb; $sql = "SELECT COUNT(*) FROM ...
0
votes
0answers
59 views

How to delete usermeta after a user is deleted?

Using the admin panel, I deleted several users that I thought were attempts to spam the site. But the records for these users are still in wp_usermeta. As a result, the user count on the admin panel ...
0
votes
0answers
24 views

use single form to enter multiple profiles

I want to allow users to add a business profile to their accounts. I have setup a form that posts the business profile information into user meta, and displays that info as part of their main profile. ...
0
votes
0answers
56 views

How to Sort User list by meta_key and meta_value

I am very newbie in wordpress and stuck into a task for many hours and not getting any way to sort out this, Thats why I am here.... I want to display a sort list of user based on meta key and meta ...
0
votes
0answers
63 views

Assign specific editor with custom user meta “A” to all authors with custom user meta “A” and exclude all other author access

I am looking to do the following: Logic/layout/cores: All contributors select a school in a custom user profile meta field All contributors also select a club in a custom user profile meta field ...
0
votes
0answers
35 views

When login session ended

I'm trying to add a user meta on user login with hooking to wp_login and then wannna delete this option after user logged out or his session expired. Is there any hook on session expiration to ...
0
votes
0answers
202 views

The right way to update Front-End user profile fields individually?

I'm designing a Front-End user profile page, allowing users to view and update their own profile information. I have the template page made, with the code to edit the profile fields as a whole from a ...
0
votes
0answers
62 views

How to remove capabilities based custom user meta

I am using woocommerce vendor plugin. So, Need to remove some capabilities when a user has a a certain field value for example -- if the user has a custom field Membership Type="standard" on his ...
0
votes
0answers
107 views

Let admin users edit member profiles from front end

I'm using WP User Frontend Pro, but the pro version lacks the feature of letting admins edit registered users profiles from front end. I'm building a web app using WordPress, and the administrator ...
0
votes
0answers
39 views

Calling update_user_meta inside of another function doesn't work

I have a function that does updates a db outside of wordpress and then I'd like it to take that information and update the user_meta table in wordpress. The print statement prints all the appropriate ...
0
votes
0answers
54 views

the_author_meta not resetting

I'm looping through posts normally. I want to display the author ... simple <?php the_author(); ?> gives me "Patrick Daly". Nah, I just want the first name, so I use <?php the_author_meta( ...
0
votes
0answers
259 views

Sort users by custom user meta value

I'm trying to sort users by a custom meta value "user_business" which is their business name that way when users are listed they're sorted alphabetically by their business name as they should be. I'm ...
0
votes
0answers
100 views

get_the_author_meta

I am just wondering if get_the_author_meta() returns value after unserializing in case it is stored in database as a serialized array? Until today, on my script, this has been returning data in form ...