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

learn more… | top users | synonyms (2)

0
votes
1answer
367 views

Help integrating Custom post type meta field with custom profile fields

I have a custom post type for "locations" and I need to have "users" log in and be able to pick a location that is within a certain distance from them. I have added some spots to the profile using ...
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 ...
1
vote
2answers
520 views

Update user meta of author when post content is viewed

I have a value that I'm trying to store as user meta for authors on my site. I need it to update itself every time the content of a post is viewed for that author. Here's as far as I've gotten but it ...
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
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
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 ...
2
votes
1answer
400 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 ...
0
votes
1answer
18 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', ...
2
votes
2answers
752 views

Add mass action to wp-admin/users.php

I'm heavelly modified my Wordpress, it's amazing what you can do with wordpress hooks, actions.. But i'm not able to find how can i add mass action for users. Let's say i select 5 users and i want to ...
-1
votes
1answer
34 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
17 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
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
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 ...
0
votes
0answers
28 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 ...
2
votes
7answers
5k views

Adding fields to the “Add New User” screen in the dashboard

I'd like to add the field "Company Name" to the add new user page in the admin panel. I've done quite a bit of searching and have been unable to find details on how to do this. I can easily add info ...
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
67 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
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
74 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
69 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 ...
2
votes
2answers
721 views

Ordering users of a specific role by last name

I'm trying to display a list of authors by their last name. I can get the list to display but as yet I don't seem to be able to order the list by last name. Any help would be greatly appreciated. Josh ...
1
vote
1answer
282 views

Exclude main blog from get_blogs_of_user

I use WordPress Multisite and in the sidebar i have a box that shows a list of blogs the logged in user is a member of. I'm looking for a way to exclude the mainblog from this list. The main blog ID ...
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
93 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
96 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
2answers
2k views

Create Unique ID for user

I have to create a membership site, but I need to give every user that registers a automatic ID number. For example, User 2 - has a code - pay-102 User 3 - has a code - pay-103 I did a forum ...
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 ...
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
1answer
49 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
41 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 ...
1
vote
1answer
279 views

Showing user ID on user main page from screen options

On the user main page in the screen options, you have some choices for displaying user information e.g.. e-mail, role, posts etc.. Is there a way to be able to display the user's unique ID?
0
votes
1answer
571 views

Add a button to users.php

I am working on a plugin that adds meta data for each user to the users.php table that is displayed by adding columns. I have that done but I would like to also add a button that will delete the meta ...
0
votes
2answers
85 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
47 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 ...
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
161 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 --> ...
1
vote
1answer
612 views

Display users in order by an “order” custom meta field

Alright, so here's my current code (which works, displaying the users in order by ID and excluding the admin user): $site_admin = "1"; $order = 'ID'; $user_ids = $wpdb->get_col("SELECT ID FROM ...
2
votes
2answers
442 views

How to use hyperdb to separate and share a user dataset between wordpress installs?

I'm looking for a way to separate my users and usermeta table to be in a different database than my main WP install. The end goal is sharing these table over a number of WP installs. From what I ...
0
votes
0answers
44 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
460 views

Show individual author rank from query of cumulative post view count for all authors

I originally was going to post a question on how I would go about ranking a list of authors by the amount of post views from all of their posts combined. But I luckily found a solution here: List ...
0
votes
1answer
62 views

Using xprofile_insert_field

I'm trying to add a xProfile to BuddyPress, but I don't know where but my snippet is not working. I have tried so many stuff, but I just can't get it right. Hope you can help, here's the latest ...