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

learn more… | top users | synonyms (2)

0
votes
1answer
775 views

Select User by Joining Multiple Meta Value Results

( I would ask this in the general stack exchange forum but I think it is more relevant here. I'm intentionally using direct queries to the database here. ) I'm trying to select a group of users that ...
0
votes
1answer
312 views

wp_insert_user not creating account correctly when ID is manually set

So, I'm trying to create a new user account with wp_insert_user based on credentials I receive from a Facebook user profile. I want the new user account ID to equal the Facebook account ID (ex: ...
1
vote
1answer
43 views

A field with dashes in the slug [closed]

How do I reach a specific userdata in the database, when that field has a dash (hyphen) - in the slug? I use the plugin WP-Members. I have created a new userdata field with the plugin with the name ...
0
votes
1answer
326 views

SImple Example To Update User Info From Front End [duplicate]

I want to give user ability to update their nickname from front end using wp_update_user and shortcode. The code below is working. add_shortcode('user-profile', 'get_current_user_prof'); ...
0
votes
0answers
24 views

use single form to enter multiple profiles

I want to allow users to add a business profile to their accounts. I have setup a form that posts the business profile information into user meta, and displays that info as part of their main profile. ...
0
votes
1answer
83 views

Get users with different roles and call function on each of them (user_meta)

First of all, I have a custom function in functions.php that gets some author information. This works on great on single posts with a single author. <?php function the_author_box() { ?> <div ...
0
votes
0answers
52 views

How to Sort User list by meta_key and meta_value

I am very newbie in wordpress and stuck into a task for many hours and not getting any way to sort out this, Thats why I am here.... I want to display a sort list of user based on meta key and meta ...
0
votes
0answers
61 views

Assign specific editor with custom user meta “A” to all authors with custom user meta “A” and exclude all other author access

I am looking to do the following: Logic/layout/cores: All contributors select a school in a custom user profile meta field All contributors also select a club in a custom user profile meta field ...
0
votes
1answer
43 views

Allow users to create and store data and retrieve it on login

I write a wedding blog and would like to allow the subscribers to login and be able to create and save their own wedding guest lists. The data they store, should be retrievable on future login to the ...
0
votes
0answers
34 views

When login session ended

I'm trying to add a user meta on user login with hooking to wp_login and then wannna delete this option after user logged out or his session expired. Is there any hook on session expiration to ...
0
votes
1answer
278 views

How to create user personal pages with information from their meta profile fields?

I asked here how to create virtual pages with information from the user meta profile fields using an external class. I got a good answer and also I have implemented it successfully (thanks to @g-m!). ...
0
votes
0answers
198 views

The right way to update Front-End user profile fields individually?

I'm designing a Front-End user profile page, allowing users to view and update their own profile information. I have the template page made, with the code to edit the profile fields as a whole from a ...
1
vote
1answer
179 views

WP_User_Query pulling ACF to loop

I'm using following code to display my users on template <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $paged -= 1; $limit = 100; $offset = $paged * $limit; $args = ...
0
votes
2answers
168 views

How to access User meta data within a plugin

I am trying to write a plugin. I have added an extra field in a registration form using the plugin successfully. I would like to check whether the value in the extra field matches any username already ...
2
votes
1answer
207 views

How to create virtual pages with information from user meta profile fields?

Dave Jesch on his site presents a way to create virtual pages in WordPress. Dave created a class "to do all the heavy lifting", as he says. I think, for my purposes this class not require changes, so ...
0
votes
3answers
678 views

How to order users alphabetically by their last name?

I use the following shortcode and function to display members of some departments: add_shortcode( 'list_of_members', 'members_listing' ); /* usage: [list_of_members department = 'psychology'] */ ...
0
votes
1answer
123 views

users and usermeta table

Is it mandatory for each user to have entries in usermeta table as well or it's optional? Recently, I came across a wordpress database which has thousands of users in user table however only a few of ...
0
votes
0answers
57 views

How to remove capabilities based custom user meta

I am using woocommerce vendor plugin. So, Need to remove some capabilities when a user has a a certain field value for example -- if the user has a custom field Membership Type="standard" on his ...
0
votes
1answer
142 views

Users Select inside custom metabox

I'm using human made's custom meta boxes framework (https://github.com/humanmade/Custom-Meta-Boxes). I want to add a select drop down in my metabox wich is populated from the users with multiple roles ...
0
votes
0answers
105 views

Let admin users edit member profiles from front end

I'm using WP User Frontend Pro, but the pro version lacks the feature of letting admins edit registered users profiles from front end. I'm building a web app using WordPress, and the administrator ...
0
votes
0answers
38 views

Calling update_user_meta inside of another function doesn't work

I have a function that does updates a db outside of wordpress and then I'd like it to take that information and update the user_meta table in wordpress. The print statement prints all the appropriate ...
0
votes
1answer
1k views

add_user_meta() vs update_user_meta()

I'm looking at the docs for add_user_meta() vs update_user_meta(). If the current meta_key does not exist for a user, will update_user_meta() automatically add the meta_key for that user or do you ...
0
votes
0answers
54 views

the_author_meta not resetting

I'm looping through posts normally. I want to display the author ... simple <?php the_author(); ?> gives me "Patrick Daly". Nah, I just want the first name, so I use <?php the_author_meta( ...
0
votes
1answer
67 views

Add meta tag to search results

In the search results I use author_name=something in the url to restrict the results. The Problem is that domain.com/?s=searchterm and domain.com/?s=searchterm&author_name=something have the same ...
0
votes
1answer
255 views

Multidimensional array problem with update_post_meta [duplicate]

I have an issue saving a multi-dimensional array using update_post_meta. Here's my code ($meta_key and $userID are set up above): $read_notices = get_user_meta($userID, $meta_key); if (null ...
0
votes
2answers
164 views

update_user_meta on registration but only for default role type

So I am running the following to update user meta on regsitration: function set_user_rcp_default_subscriber($user_id) { update_user_meta( $user_id, 'wp_user_level', '0' ); update_user_meta( ...
0
votes
0answers
152 views

wp_capabilities for administrator (sharing user tables)

I'm attempting to share only the user tables across two separate wordpress websites. I'm not a hardcore coder or anything but I know just enough to understand and tweak things. I found this question ...
0
votes
1answer
856 views

Updating wordpress user meta data array (unexpected multiple arrays)

So I am trying to update a user meta data array that I have previously stored with this function: function oe_charge_customer( $customer ) { // load the stripe libraries ...
1
vote
1answer
189 views

Get user's ID on logout

Is it at all possible to get a user's ID in a function right at the point of log out? I tried to hook it to wp_logout, but it just returns null when trying to get the user's info. I'm wondering if ...
0
votes
0answers
76 views

Unsetting/Removing custom meta data on a page

I've made a custom meta box where you can upload an image attached to the post. I've done this since the image isn't placed in the normal content area but separate. /*** Custom post upload ***/ ...
5
votes
3answers
365 views

Add default WordPress tag meta box to User Profile

I've set up my user profiles to allow custom taxonomies following this tutorial. Ideally, I'd like to use the default Tag meta box from the Post screen, so users can easily add new taxonomies and ...
0
votes
1answer
39 views

How to output taxonomy term (incl. link to archive) on author.php?

I have used the excellent tutorial of Justin Tadlock on Custom user taxonomies in WordPress to add a Blog custom taxonomy to both my Posts post_type as well as the user object_type. In his tutorial ...
1
vote
2answers
58 views

Average Account Age

I'm trying to see if there is a way to find an average age of user accounts which came through my wordpress site not including the age of the administrator account. When I say age I don't mean their ...
0
votes
1answer
88 views

Does WordPress Need BuddyPress to Handle Large Amounts of Users?

I understand that technically there can be 18446744073709551615 users (db limitations). But I heard at a talk that the vanilla install of WP in actuality can't handle many users that well due to ...
0
votes
1answer
57 views

Randomize Users

I'm trying to randomly display my users and I was wondering if I could edit the answer on this page to suit my needs (multiple users instead of a single user): Sidebar random author spotlight Here's ...
0
votes
0answers
241 views

Sort users by custom user meta value

I'm trying to sort users by a custom meta value "user_business" which is their business name that way when users are listed they're sorted alphabetically by their business name as they should be. I'm ...
3
votes
2answers
194 views

Search multiple meta keys at once

How would I modify the following SQL Query to allow me to search multiple meta keys at once? e.g. user_business AND user_about In the end I'll be searching about 40 - 50 different meta keys; or if ...
0
votes
1answer
173 views

WP_User_Query not searching

I currently have the following code, and a user named "Clark Farm" in the user_business table. The code below returns nothing. If I remove the search term then all of the users are listed. I'm trying ...
3
votes
1answer
403 views

Where the Nickname is being used in WordPress

I see most of the place is using the "Display name", so why I need to set a Nickname? Where it is being used?
0
votes
1answer
39 views

Display all existing members

How would I (using a loop) pull in all of the existing users? I'm trying to loop through these users and then pull in meta data for each one.
0
votes
3answers
156 views

custom user meta query

I've been trying to get this query to work but it keeps failing to return any rows SELECT a.ID FROM wp_users a, wp_usermeta b WHERE b.user_id=a.ID AND ( (b.meta_key='firstname-groom' AND ...
0
votes
1answer
90 views

how do I add role and capability after I create a new user

I have a simple requirement: 1. create a user 2. create a role for the user 3. add capability for the role First, create a new user $uid = wp_insert_user($userdata); Second & Third, create a ...
0
votes
1answer
52 views

Array of user ids to list of user names

I'm outputting an array of user ids from metadata like so: $awaygoalby = unserialize($post_meta_data['report_away-scorers'][0]); and I want to change each user id to the user name. So I was hoping ...
0
votes
1answer
80 views

Using IDX feed to display agent's and listings with agent's info associated for Real Estate Website

Trying to figure out how to get a user/agent to be associated with their IDX/mls number. Have been trying to find a way around this since Diverse Solutions does not give a feed for agent's info, ...
0
votes
1answer
24 views

Get user_meta values for a user for an array of meta_keys?

I would like to retrieve the meta_values for an array of meta_keys for a user. Is there a function in WordPress core that offers this functionality? Something that would work like this: ...
1
vote
1answer
192 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
2answers
257 views

Show image if author meta (profile fields) exists outside loop

I am trying to show the profile fields (like AIM, Jibber) outside the loop. I managed to do that with <?php global $post; $author_id=$post->post_author; ?> <?php $field='aim'; ...
0
votes
2answers
42 views

User Meta stuff

Ok I am trying to make a page the list user meta. http://pastebin.com/rw1t7Mgp The part I am stuck on is $our_children = get_user_meta ($user_id,"our_children"); it is a meta field with an array ...
0
votes
1answer
31 views

How to store array in usermeta in wordpress

I have a custom user registration form and am trying to store multiple values in the usermeta. This is a sample code I am using, however it just stores the last option selected (i.e. if I select from ...
0
votes
1answer
274 views

Reduce number of SQL queries inside WP_Query loop to fetch author data

This question applies to scale and does not concern typical blog implementations. I'm working on a web app where I'm running standard WP_Query to fetch some custom post types. This usually results in ...