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

learn more… | top users | synonyms (2)

0
votes
1answer
43 views

Test if key is in user_meta array

I want to associate certain users by means of a custom key stored in the user_meta for both users. There may be more than one-one relationships, so it'll be in an array. If 2 users have the same key ...
0
votes
0answers
24 views

How can I display all the blogs where this user is editor in Wordpress Multisite? [duplicate]

Very similar question with correct answer I guess my question is simple, I run multisite and on some blog I want to display <> thing The link I posted does not work for me, but it is marked as ...
1
vote
1answer
462 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
656 views

get_user_meta() doesn't include user email?

I simply wonder why <?php var_dump(get_user_meta(4)); ?> doesn't contain an email address of the user. Instead I have to use get_userdata(4)->user_email; to query the email of the user. ...
0
votes
1answer
139 views

Countdown to date function?

When a user signs up on my site they have to select a date as part of resignation. On their profile page I need to show a countdown to that date. Something simple like attached. How can I create this ...
-1
votes
1answer
283 views

Problem with update_user_meta() meta_value

I am trying to insert a large number of user in to the wordpress db using wp_insert_user(). After inserting each user, I am trying to add an user meta for each user. I am doing like this: $meta_value ...
0
votes
1answer
72 views

Sorting custom post type by usermeta

I have a profile (a CPT) directory set up and I'm trying to find a way to sort the results based on the last login time of the post author. The goal is to reward recently logged in authors by pushing ...
1
vote
1answer
3k views

wp_update_user doesn't update and update_user_meta does

I'm building user profile page where users could update their profile on the front-end. User profile is extended with a few custom fields, like 'Twitter', 'Facebook' and 'City'. The following code ...
0
votes
1answer
30 views

What is best for saving lot of extra detail of user?

In my site i need to store 200 extra data for each user. Now i know about the user meta option. But is it a good way to save 200extra field for each user? Or should i create an extra table in the ...
0
votes
2answers
339 views

Getting list of top 10 users and sort on last name

I would like to display a list of the top 10 authors based on the amount of posts that they have, and then sort them on last name. To my knowledge, this is not trivial since the last name of a user ...
1
vote
4answers
904 views

How we can get the user id by its display_name

I have user display_name and with this I want to get the id of that user. So, how can I get the user id?
0
votes
1answer
62 views

How to relate the Category to user?

I am developing one new plugin, In that i had a section to create new category, and having the field Created By(listing all the users in this field). I am storing the category name in WP_terms and ...
0
votes
1answer
51 views

Identify admin/logout and more filters

I have several links I need to apply filters to them. Having hard time understanding from the documentation which are the correct filters I need to use. I am not using the default theme. This links ...
1
vote
1answer
133 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
158 views

update_user_meta updates to a wrong ID

Background Problem The site I'm working right now uses custom front-end forms for content, terms and user editing and creation. Access to wp-admin is blocked for non administrator. All of them uses ...
2
votes
2answers
446 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
1answer
226 views

How do i get a specific user metadata using custom metavalue outside of wordpress?

I need help. I need to get a user ID or email (email is can do but ID is better) based on their phone number, outside of WordPress. I already have their phone number in a variable and billing_phone ...
0
votes
2answers
915 views

How to: get_user_meta - BuddyPress [closed]

What is the proper way to display User Meta in the BP Loop using this line from codex? <?php get_user_meta($user_id, $key, $single); ?> I added that line to the profile loop and switched ...
2
votes
2answers
725 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 ...
0
votes
1answer
274 views

How to save a label for an extra user meta field and to display it later?

Bellow is how I currently add, save and display an extra user meta field: /* Add Extra Fields to the User Profile */ function extra_user_profile_fields( $user ) { ?> <table ...
0
votes
3answers
532 views

Display user meta data from a textarea as a formated text

With the below two functions I can add a textarea custom user meta field named 'publications' to the user profile and save/update it: add_action( 'show_user_profile', 'extra_user_profile_fields' ); ...
0
votes
1answer
614 views

Using and saving custom dropdown boxes on user profiles

Okay, so I'm creating a website and am in need of help for some custom meta fields for user profiles. Currently I have the following in my functions.php file: //hooks add_action( ...
0
votes
2answers
1k views

How to display some selected user meta data on a specific page with a shortcode?

I need to display on some specific pages some selected user meta data (not all), for some users. On the Wordpress Codex page for the get_user_meta() function we have this example (user_id = 9): ...
0
votes
1answer
563 views

gform_after_submission not working as expected [closed]

I am trying to augment a value to the wp_user_meta table, utilizing Gravity Forms. And I'm not having any luck. I had a version of this working on gform_pre_submission (though without the ...
0
votes
1answer
182 views

How to add to a user_meta field (append)

Is this possible? I want to use Gravity Forms or another hook to somehow write to the END of a user_meta field - not overwrite it. For example... Before: $purchase_history = ...
1
vote
1answer
225 views

Job of meta_key meta_value fields in database tables

I'm researching the structure of WordPress database and there is something that really get me confuesd. Could someone please explain, what is the exact job of meta_key and meta_value fields in ...
0
votes
2answers
2k views

get_the_author_meta not working

So I have this website that I am building and I am using get_the_author_meta to display various information about the user / author including user image. I added a function in my functions.php which ...
0
votes
2answers
329 views

How to build a fool proof AdSense revenue sharing model?

I have 5 author levels in my WordPress site. Levels are calculated using points - level 1 - level 2 - level 3 - level 4 - level 5 Authors getting impressions based on author levels like this. ...
0
votes
1answer
949 views

Validating a new user registration field

What I'm trying to do: Add new user meta fields that can be updated when the user edits their profile Validate them correctly when the form is submitted What I've done: I have successfully added ...
0
votes
1answer
371 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 ...
3
votes
1answer
371 views

Show Biographical Info while creating new user

Is it possible to show the Biographical Info textfield while creating a new user? I know it's possible to add user bio by editing a user AFTER it has been created. But I would like to do this while ...
0
votes
1answer
163 views

get random users each time based on the meta key

I have many users on my website, out of some has status "elite". I am saving this status in meta key/value for each user ('meta_key' => 'elite_member', 'meta_value' => '1'). I want to display ...
0
votes
2answers
90 views

list or get meta_key where meta_value is 'something'

I'm trying to get with get_user_meta the meta_key where the meta_value is 'ive-read-this' But I do not get the value. What should I do?
0
votes
2answers
329 views

very last action before during user registration before he is redirected to homepage

I'm using wordpress social login plugin. So some of my users register via facebook. I'm trying to hook myself to user_register and display only once upon registration and upon using facebook as ...
0
votes
3answers
111 views

How to pull user/author profile data in a plugin?

My site has a user profile page. For some reason I would like to pull user profile data in my plugin. I know I can pull logged in user profile data using get_currentuserinfo();. For example I would ...
1
vote
0answers
344 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
1answer
567 views

remove user_meta data from database for all users

I'd like to create a button for admins to be able to delete from table wp_usermeta -> key: 'ref_credit' for all users. Is there simple resource friendly way to do this? does wp have built in function ...
0
votes
2answers
229 views

Featured image for social sharing ot author archive page

Personal blog with occasional guest authors (non-commercial) self hosted Wordpress. I create a bespoke author PHP file for each author (example). I use Yoast SEO and set a default image for meta ...
2
votes
2answers
3k views

Can I create front-end editable user profile pages with Wordpress? How do I do it?

I'm trying to build a WP site where using the front-end, each user can: Register through the front end using basic fields Log in Create their own profile page using multiple forms Upload text, image ...
0
votes
1answer
144 views

Combining two meta_values within one row with query

I've added two new meta_keys to the wp_usermeta table: bid_user_lat and bid_user_lng And I need to be able to get both of these values within a single row, along with the user_id. ROW - (user_id) ...
0
votes
1answer
62 views

How 'secure' are loops?

I am using loops as means of displaying personal meta and customer information on the frontend. For example, I have a page which displays a user's 'profile' information to edit. Their profile is ...
1
vote
1answer
363 views

Get the Google+ and Twitter links - Wordpress SEO plugin

I want to use the Google+ and twitter links that can be added in User's profile using the WordPress SEO plugin and display them on the author page. Is there any way I can get those links from the ...
1
vote
2answers
366 views

How may I filter get_users() similarly to pre_get_posts?

I have filtered posts, pages and custom_post_types based on $current_user custom usermeta field values using pre_get_posts(). Is there a similar method/function to alter get_users() based on ...
0
votes
3answers
429 views

get Insert id for meta field

I'm in a situation where i also need to get the id of the inserted meta( meta_id for post meta and umeta_id for user meta) For eg i add a user meta ...
0
votes
1answer
164 views

Echo text if field under user_meta is empty with get_users()

With get_users() I am listing users and their information. I've a custom field in the database, people_lists_class. <?php $blogusers = get_users('role=contributor&orderby=display_name'); ...
0
votes
2answers
1k views

How to get the user description with get_users?

I'm using this piece of code to list users and their information. The problem I'm having is that the description isn't showing. Obviously it's because the description lays under "user_meta" and not ...
0
votes
1answer
2k views

Return all users with a specific meta key

I'd like to use get_users() to return all users that have a particular meta_key, but I don't want to specify what the value has to be because it will change for every user. The value is a json string. ...
-2
votes
1answer
141 views

Get all user with both meta_value

I was wondering if there were any efficient way of fetching all user comparing two different meta_key. I am currently fetching all user compared to the first meta, then loop trough the user_id to ...
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 ...
-1
votes
1answer
208 views

Multiple Email Addresses, One User

I'm trying to allow a user to have multiple email addresses associated with their account. update_user_meta() will not work because it will overwrite the current email. add_user_meta() wouldn't work ...