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

learn more… | top users | synonyms (2)

0
votes
1answer
30 views

Exclude specific user_id from args in get_comments

I'm basically using a 'latest comments' system on multiple pages where one specific user is listed as the first reply for a comment - highlighted with special CSS - and then 2-3 normal users below ...
0
votes
1answer
38 views

Adding fields to the “Add New User” but the form data not saved into DB

i have add new fields when we create new user in user-new.php the new field appears in the form, but the form data not saved into DB. after i created new user, i go to "edit user" and see the field ...
0
votes
1answer
16 views

WPML Default Language User Meta [closed]

I'm having a super hard time finding the names of the default user meta that's included with WPML. WPML has a setting for "Default Admin Language" under every user's profile. I'd like to access this ...
0
votes
0answers
16 views

Include new meta_data in WP_User_Query

I'm trying to add a new meta field to the results that come from Wp_User_Query. Not keen to use get_user_meta() in a loop for each user returned as I believe that it'll make hundreds of database ...
0
votes
2answers
39 views

What is the most efficient way of implementing a notification system? [closed]

I am about to start implementing a notification system for my site and would like to know what performance measures I need to take into account before developing it. I need to make this for a large ...
0
votes
0answers
4 views

any way to bind a taxonomy term to o user to just query it afterwards?

I need somehow to add an existing term from an existing taxonomy to a user like a category of users, but not for the purpose of limiting them to posts is that easily possible? I found some plugins ...
0
votes
1answer
17 views

How do I sort a WP_USER_QUERY by multiple meta fields?

I've got the following WP_USER_QUERY in WordPress: $args = array( 'orderby'=>'meta_value', 'meta_query' => array ( 0 => array( 'key' => 'last_name', ...
0
votes
0answers
25 views

restrict_manage_posts for users?

restrict_manage_posts is great for allowing me to filter posts by taxonomy on the admin page. Is there any way of using a similar function for the users admin page - so I can filter by user meta data ...
-1
votes
1answer
31 views

Can't sort custom column on user.php by number / meta_value_num?

Everything else works fine but it's still not sorting by number. Would just like to know what I'm doing wrong here Here's the code function add_user_columns( $defaults ) { ...
0
votes
0answers
27 views

How to toggle delete/update user meta values?

I have multiple forms which stores extra user fields in usermeta table. For this i use foreach($user_meta_fields as $user_meta_field){ If($_POST[$user_meta_field] !=''){ ...
0
votes
0answers
25 views

Paginate User Query

I am trying to write a simple shortcode function that will return a list of users based on a given meta value. It functions fine, but I am trying to paginate the list. Here is my code: function ...
0
votes
1answer
34 views

WP_Editor not saving data in user_meta

I have a front-end plugin which allows users to modify the fields (user_meta) of their profile, and everything works except the wp_editor. <div class=""> <label ...
0
votes
0answers
22 views

Preventing concurrent update of data

I have to implement the update of some metadata. An algorithm try alter some global variables in order to minimize a global error function. This algorithm is triggered by users who ratings each other. ...
0
votes
0answers
66 views

Create custom fields/meta data gender+country - radiobuttons and dropdown on register screen for these fields

On register I want the user to select gender (radio buttons) and a country (dropdown from list of countries) as well as an agreement checkbox. I'd also like all of these to be editable on the user ...
0
votes
1answer
73 views

WP_User_Query with combined meta query - not working?

I'm trying to use WP_User_Query class to list all users basing on their specific meta fields. When I use simple single-meta query, it works fine: $q = new WP_User_Query( array( 'role' => ...
0
votes
1answer
54 views

How to Make admin Sidebar Menu always be Collapse by code

I have solution with js that click on the Collapse button, but this is no good solution. I want to make this work true DB with php code. I found that the table who hold this value is wp_usermeta. ...
0
votes
1answer
68 views

Sanitize textarea instead of input

I want to add a new field to the user registration. I'm using this tutorial: http://www.paulund.co.uk/add-custom-user-profile-fields It worked great for me, but I want to switch the input text to ...
1
vote
1answer
57 views

Query wp_usermeta alongside wp_users

I want to use the WordPress query functions and no external plugins for the task. Here is what I have so far: add_filter('user_search_columns', 'user_search_columns_bd' , 10, 3); function ...
0
votes
1answer
19 views

Update vs Insert logic but the last key is always inserted?

I have added a custom db table which looks like usermeta table, just storing some key - value pairs. But now i am stuck with the following logic a/ if key exist for a user use an update query else ...
0
votes
0answers
90 views

Custom Post Type admin order by usermeta value

I would like to allow admins(and users) to order the listing of posts by editor(custom role) last name(ASC or DES) while viewing the listing of posts in the admin area. I have a custom post type that ...
0
votes
0answers
95 views

Custom query to update user meta data (also with a custom table)?

I have add a custom table (wp_shopping_metavalues) to the WP install which looks like wp_usermeta. I am displaying user values from both tables. For the insert i use function ...
0
votes
1answer
32 views

If logged in user meta is

I was wondering if it's possible to display certain content if a user meta field is set to a certain value. The most related thing I could find is get user meta, however it seems to get the user ...
0
votes
1answer
48 views

Remove fields from Wordpress profile

Does anyone know how I can remove the Twitter and Google Plus profile fields from my functions.php? This is the code that I am using: function modify_contact_methods($profile_fields) { ...
0
votes
0answers
39 views

Getting user meta value in default user list in wp-admin (MU)

is there any way I can get value from a specified user meta in the default user list in WPMU? I am talking about the wp-admin/network/users.php list. It lists Username, Name, E-mail, Registration date ...
0
votes
2answers
84 views

Serializing User Role for update_user_meta

I've created a custom user role and am attempting to change the users role from CUSTOMER to ADVOCATE on purchase of a particular product (using WooCommerce). I'm really close but struggling to get the ...
0
votes
1answer
42 views

How to query authors by custom taxonomy?

I have a custom taxonomy for users which is country. Is there a way to query all admins by term_id or should I get all users and check each one with a for loop? I tried this: $user_query = new ...
0
votes
2answers
73 views

Storing user submitted forms [closed]

I was wondering what's the best way to create a form which can only be seen by registered users. The main idea I'd like to achieve here is for users to log in and gain access to a page where there's ...
1
vote
2answers
46 views

How to use an associative array in post__in with WP_Query?

I have stored user favorite posts in the user_meta table of WordPress. The data is stored in a format, for example a:1:{s:8:"post-134";s:3:"134";s:8:"post-136";s:3:"136";}. How can I get this in the ...
1
vote
2answers
102 views

Select Multiple meta_value from WP DB; Single Query

I am trying to retrieve each user's first and last name, phone, email, and address from the usermeta table. I'm having trouble selecting multiple meta_values, each with its own meta_key, using a ...
0
votes
0answers
16 views

WPMU add custom colum

I managed to add the columns that I wanted in all the wpmu sites using: add_action('manage_users_columns', 'header_column'); add_action('manage_users_custom_column', 'manage_column', 10, 3); ...
0
votes
2answers
35 views

E-mail Update - Validation

i want to know what is wrong with this code: if ( !empty( $_POST['email'] ) ){ if (!is_email(esc_attr( $_POST['email'] ))) $error[] = __('The Email you entered is not valid. ...
0
votes
1answer
44 views

Automatically Populate Post Taxonomy Data Based on Post Author Meta Data?

I'm trying to use author meta data to automatically populate a custom taxonomy on a given author's post(s). Currently, the taxonomy is visible on the post page, but I intend on hiding it from the ...
0
votes
2answers
61 views

Function to pull data from user meta not working

So I am attempting to create a series of functions that calculate a price based on a client level I have set for each customer. Some customers may have a special deal. To do this, I created a custom ...
0
votes
0answers
26 views

GET user's metadata, list it in descending order and GET user's list number

I have a custom user metadata with meta_key reputation. The value is numeric. It is like a points system. The higher value the user has, the higher reputation they have. How do I GET where each user ...
0
votes
1answer
154 views

Custom registration form and custom field

I've created a custom registration form for my website with this code: <?php /* Template Name: Registrazione-Custom */ get_header(); ?> <!-- Row for main content area --> ...
0
votes
0answers
43 views

Query to select specific users is not returning any users

I use wordpress and have the following query to select specific users, but the query is not showing any users when running it put together. global $wpdb; $date2day = date("d-m-Y"); ...
1
vote
1answer
70 views

WordPress last login foreach user

Trying to get the last login of each user and display it into the admin panel. Currently I can display the first user within the admin loop, however I can't pull out the remaining users. I think I ...
1
vote
1answer
46 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 ...
0
votes
1answer
56 views

New User Save Filter

I'm using the new(ish) filter add_action( 'user_new_form', 'funcy', 9 ); to add custom fields to Create A New User page. I'm then using add_action( 'personal_options_update', 'save_user_meta' ); ...
0
votes
0answers
25 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
1answer
89 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 ...
0
votes
0answers
101 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
1answer
61 views

Update user meta array using foreach

I have two arrays consisting of keys and values: Array consisting meta keys: $user_meta_fields = array ( 'first_name', 'last_name', 'job_title', 'college', ...
0
votes
1answer
40 views

update_usermeta don't work

When I return in the function $setfound, I become a white screen and when I return $setlink, it works fine. function editsteamlink(){ $setlink = $_POST['steamlink']."/?xml=1"; $setresponse = ...
0
votes
2answers
39 views

Is a user_meta research case-sensitive or not

I am using the Wordpress get_users() function to search for users with a specific meta_key value. $wordpress_user = get_users( array('meta_key' => 'unique_id', ...
0
votes
1answer
196 views

using update_user_meta to rank users

I'm using a plugin that allows users to vote on posts, I'd like to add each vote that's cast to the authors user_meta so I can rank users the same way I rank posts. There's a couple of different ...
0
votes
0answers
67 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 ...
1
vote
0answers
28 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
1answer
59 views

How to work with AJAX and Wordpress?

I'm working on my first plugin. I would like to add a follow button for the posts, so the logged in users can follow the authors. I placed the following lines into functions.php function ...
0
votes
0answers
32 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( ...