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

learn more… | top users | synonyms (2)

0
votes
2answers
3k 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
376 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. ...
2
votes
1answer
2k 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
594 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
553 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
224 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
109 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
512 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
123 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 ...
3
votes
0answers
393 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
2k 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
308 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
4k 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
163 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
65 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
447 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 ...
2
votes
2answers
779 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
809 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 add_user_meta($user_id,'some_key',$some_value,...
0
votes
1answer
234 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
2k 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 "...
1
vote
1answer
6k 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
154 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
3k 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
296 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 ...
-1
votes
1answer
2k views

Checking if meta_value exists for any user

I'm using gravity forms for a sign-up form and I set up a hidden field that is automatically filled with a random string generated and passed to the form by add_filter("...
0
votes
1answer
693 views

editing usermeta when field is an array

I'm using s2member and I added a new registration field to my registration form. s2member stores all custom registration fields in an array under the meta key wp_s2member_custom_fields. An example ...
1
vote
1answer
447 views

Adding data to an array in usermeta and displaying it in a loop

I have a front end post form where I take a file upload of an image. That image gets stored as a custom field which is easy enough to do. What I need to do though is store each unique image url for ...
1
vote
1answer
2k views

Show a list of recently viewed posts to a user

I have a lot of video posts on my site and I'm looking to show the user a list of posts they've recently viewed. I'm guessing the best route is to just add the post id to an array in their usermeta ...
1
vote
1answer
998 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 $...
0
votes
3answers
1k views

No first_name or user_firstname property in WP_User object

I'm writing a basic plugin. Here's my code: $new_user = get_userdata($user_id); $first_name1 = $new_user->user_firstname; $last_name1 = $new_user->user_lastname; echo "<" . $first_name1 ...
1
vote
1answer
2k views

How to get Viewing profile ID in buddypress? [closed]

I want to get the viewing profle's (another user's profile that current user is viewing) user_id is there any shortcode or function available for it? Thanks in advance.
1
vote
1answer
342 views

Custom User Field in Dashboard Widget

I checked justin tadlocks custom profile field tutorial and wanted to add the field in the custom dashboard widget but it seems it's not working. I want to show all the user information in this widget....
1
vote
1answer
115 views

Incrementally add or substract from usermeta field

I'm trying to create a system to add credits to a user account and then later subtract from the credits when the user submits a post. I have the functions I need to trigger the adding credits and the ...
16
votes
4answers
11k views

How to create a front end user profile with a friendly permalink

I want to create a public front-end profile page with a friendly url like this format. mysite.com/user/someusername Any idea on how can i achieve this? I know it has something to do with rewrite ...
3
votes
2answers
2k views

wp_update_user not updating

In desperation I am asking for help in this forum too - if someone (ANYONE!) could take a look a this post and see if they could help I'd be eternally grateful http://wordpress.org/support/topic/...
1
vote
2answers
135 views

How to tell whether a user meta value has increased or decreased [closed]

I store a custom user meta value for my users that is stored as a number like a score. I need a way of telling whether it has decreased or increased from its last value. So when I display it I can ...
-1
votes
1answer
1k views

WPML - how to translate user profile fields with icl_t()? [closed]

Existing code somewhere in a template or shortcode handler, display user profile biography: <?php if ( $user ) : $bio = get_the_author_meta( 'description', $user->ID ); ?> <div class="...
1
vote
2answers
652 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
2answers
1k views

update_user_meta not updating

I'm trying to force password change upon first user login, which overall is not working, but so far I find a problem update_user_meta() is not updating at all, this is my code: function ...
3
votes
2answers
1k 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 ...
0
votes
3answers
2k views

get current user not working

I was trying this code to get current user info, but showing nothing. My WordPress version is 3.3.1 <?php wp_get_current_user(); /** * @example Safe usage: $current_user = ...
0
votes
1answer
1k views

Wordpress User Profile Upload - If page is saved file reset

I have various different extra profile fields which I have set in functions.php however with the upload one if a user uploads an image and saves the form the image is set, however if they go back and ...
1
vote
0answers
100 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
3k 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. http://www.scribd.com/doc/81666407/Add-and-Remove-WordPress-User-Profile-Fields-and-Display-Them-Within-...
1
vote
1answer
414 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
4k views

How to get data from an array using get_user_meta()

I have created a custom user profile field <?php $basics = get_the_author_meta( 'fbasics', $user->ID ); ?> <ul> <li><input value="lesson1" name="fbasics[]" <?...
3
votes
1answer
419 views

How do you make the email field on the profile page read only for subscribers?

I would like to make the email field on the profile page for subscribers read only. They can see their email but not change it. I want only admins to to be able to change users email address.
0
votes
2answers
872 views

Solving a get_user_meta() problem in Multisite

I am currently building a network of blogs for individual real estate agents. Currently, a broker will have a main site, with agents sites added as subdirectories, e.g., www.example.com and www....
0
votes
2answers
5k views

Drop down list in user profile page

I am having problems finding an answer to this. I need to have a custom user meta field. I can create them which is fine but I need to create a drop down one. For example I want the user meta to ...
0
votes
1answer
1k views

Is there a limit to the length/size of serialized data that can be stored as user meta?

I tried to store an array containing about 50000 keys and respective values to the user meta using update_user_meta. Since, this was only a test, I ran a for loop to generate the array. $test = array ...