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

learn more… | top users | synonyms (2)

0
votes
0answers
10 views

How to let users personalize their content? [on hold]

I want to create a highly personalized site for my users. However, I haven't come across any tips or solutions in my searches. Are there any plugins, widgets, etc out there that would let each of my ...
2
votes
2answers
36 views

SQL to check how many sites a user is a member of

I have a multisite installation and I'm working on creating a reporting plugin. One of the things that I would like to do is show the number of sites a user is a member of. Right now, I'm using ...
1
vote
1answer
56 views

How to add country drop down menu to the user profile?

I've added this code snippet to my functions.php function my_new_contactmethods( $contactmethods ) { $contactmethods['country'] = 'country'; return $contactmethods; } ...
0
votes
1answer
17 views

Populate a select box with data stored in the database?

I know generally how to add custom fields to the user profile page. However, I need to add a custom select box to the profile page that is populated with all the schools in the state. (Our users will ...
0
votes
0answers
6 views

when update user_nicename ,Englishi work well,but Chine will be empty

I builted a form to update user's profile. all fields worked ,but if I input something in Chinese,fileds will be empty,Code is blow: /* Update user nicename. */ if ( !empty( $_POST['nicename'] ) ){ ...
0
votes
0answers
11 views

Why all contributor that have post not have page

I have problem when moved from drupal to wordpress. Now i have user in contributor that have post in my site. This user cannot see his post in my site in homepage. To solved it i convert him to ...
0
votes
1answer
15 views

How To Get User Data in Callback Function for pre_user_nicename?

Whenever I update a user profile in the dashboard, the user nice-name gets changed in the database: Every time, a "-2" is added. I tried to reset the nicename (based loosely on this thread) by ...
1
vote
1answer
49 views

Is this code true or not

I am a beginner in coding but i have just wrote this code , The concept of code is : The code adds a form with a button to each user profile. The button is captioned as Follow/ Unfollow. It updates ...
0
votes
1answer
22 views

How can i create an array user meta?

I want to create a new user meta that contains array content How can i do this ? Another question : is it true using this code to check if the array user meta exists before creating it ? <?php ...
0
votes
1answer
46 views

How to add follow functionality to multi-author wordpress site?

is there any way to add "follow" functionality to Wordpress ? so that every logged-in user can follow his favorite author and only can see post from authors that he followed them .. A possible ...
-1
votes
1answer
38 views

How To Display Author Photo In WordPress without any plugin?

How To Display Author Photo In WordPress without any plugin? I know there are many plugins in wordpress that give me solution. But I don't want to use any plugin. Is there any way to add image for a ...
0
votes
2answers
37 views

Get currentuserinfo firstname and lastname

I am trying to insert the user firstname and last name into the database whilst processing a woocommerce order. I have managed to get two empty fields into the database where I need them however i am ...
0
votes
1answer
45 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
52 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
23 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
20 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
44 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
7 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
34 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
33 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
41 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
34 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
31 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
54 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
26 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
91 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
149 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
74 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
129 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
74 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
22 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
126 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
152 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
38 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
63 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
52 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
102 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
57 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
99 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
52 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
123 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
18 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
46 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
47 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
67 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
242 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
49 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
88 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
54 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 ...