The user-meta tag has no wiki summary.
1
vote
1answer
27 views
Query users by capability - uninstall/deactivate callback
The situation
Running on MU, I'm writing an open source/publically and freely available plugin. As I used add_screen_option() to allow users to easily setup the admin page to their likings, I'm left ...
0
votes
0answers
23 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 ...
0
votes
1answer
26 views
Display Country Flag in Profile Wordpress/Buddypress
Hoping someone could help me with a question regarding displaying country flags next to a member name. Right now I am using a custom meta containing country and then echo the flag back if the ...
0
votes
0answers
22 views
Sort by user meta data
I am using the plugin: ep-display-user and can't get it to sort by meta. This is my code:
function epdu_get_users($visible){
$user_ids = $this->wpdb->get_col("SELECT ID FROM $this->table ...
0
votes
1answer
33 views
Matching usermeta at registration to categories of content
I'm trying to connect some user_meta data from registration form to some categories set up in admin to filter the presentation on the page. This one is tripping me up because the question has multiple ...
0
votes
1answer
173 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
1answer
133 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
22 views
Get custom_user meta value and add entry
I created a custom user meat value and want to add a new key/value to this array. But somehow I can't get it to work correctly, I always get a new array in side the array so that I always have e new ...
1
vote
0answers
16 views
Update User Meta after Registration [closed]
After a user registers, I am creating two pages of two different custom post types, and then need to store a custom meta value in their user data to assist with redirects later. I've found that if I ...
1
vote
1answer
37 views
Separate table or usermeta
We are creating custom fields for users like annual income, gender, city, country, etc. There are about 10 odd new fields. We will be importing approx. 30,000 records for each user in a month through ...
0
votes
0answers
21 views
get_the_author_meta
I am just wondering if get_the_author_meta() returns value after unserializing in case it is stored in database as a serialized array?
Until today, on my script, this has been returning data in form ...
0
votes
0answers
33 views
WP_User::__set doesn't persist custom fields as it claims
Looking through WP_User in version 3.5.1, the magic methods __get and __set supposedly read and write from custom fields, per their comment blocks.
/**
* Magic method for accessing custom fields
*
...
1
vote
1answer
87 views
User defined password at registration - registration email sends auto generated pass
Updating some meta fields on registration and providing the user the option to pick a password yet the registration email sends the auto generated password. User defined password works and not emailed ...
0
votes
0answers
50 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 ...
1
vote
2answers
430 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
...
0
votes
1answer
31 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
0answers
10 views
How to add login/logout meta in custom menu? [duplicate]
I want to Login & Logout meta in my Wordpress website. When user is not login, in menu Login meta shown. When user logged in, menu shows logout meta. How it possible?
1
vote
1answer
37 views
How to save data of an input field to an array
I'm writing a plugin to edit my profile page.
How can I save data of an input field to the database and then display it?
This is my code. The first part is the display in HTML:
<form method ...
0
votes
1answer
21 views
duplicate user metadata key values
I've spotted that some of my users have duplicate metadata key values (my only fault because i inserted data directly to the wp_usermeta table!). This query for example
SELECT * FROM `wp_usermeta` ...
-1
votes
2answers
32 views
Show User Their Password
I've got a few automated scripts that run to notify users of certain updates to the application, etc... and for one in particular, I need to be able to display the users user_login and their password.
...
1
vote
1answer
22 views
Can I prevent “wp_user_level” from getting added to wp_usermeta on registration?
I've heard this meta key is obsolete, but they are still getting created every time a user registers. Can I prevent this? I'm trying to slim down that table.
1
vote
1answer
131 views
How to get user-meta from Social Login registered users?
It looks like social login plugins (such as Wordpress Social Login, OneAll etc.) do not create users in the original wp-database as regular registration from Admin dashboard. Hence it is not possible ...
0
votes
1answer
202 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 ...
1
vote
1answer
51 views
Extend the wp_users table
I'd like to to extend the wp_users table in my WordPress' database.
Why? I want people to add more information about themselves when they sing up at my website.
I know how to extend it, but I'm ...
1
vote
1answer
251 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
26 views
Distinguish profile user and admin user IDs / get ID of user being edited
On the user-profile page of my site I want to allow admin role users to be able to edit specific user-meta fields of subscriber role users.
How can I distinguish between the two user IDs.
The ...
1
vote
1answer
41 views
Possible bug: update_user_meta is updating two unique meta entries
On a CPT page I am checking to see if the user is logged in; if they are, I'm checking to see if they have a meta entry which is 'session-' + the current page's stub. If they do, I increment the value ...
1
vote
1answer
35 views
Is it possible to store visitors IPs in wp_postmeta table?
Or in any of the other 11 Wordpress tables. I also need to store: submission date, name, contact number in the same table.
What approach would be best? A custom table or using a standard table?
8
votes
3answers
705 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 ...
0
votes
1answer
23 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
52 views
Rank users by comments received on all of their posts
the piece of code below currently fetches a count of all the comments every user has written and ranks these users accordingly. I was wondering if anyone could figure out how to modify it to fetch ...
0
votes
0answers
38 views
Update 1 specific field wrapped in shortcodes on frontend?
I am working on a page template where users can update their profile fields on the front end. I am using profile builder pro and it works fine however I am trying to recreate a specific field so I can ...
0
votes
0answers
22 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 ...
0
votes
1answer
44 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
45 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 ...
0
votes
0answers
24 views
How do I save user_meta from user list column?
I have two additional columns on the user list view. 1 just grabs data that has been set, but I want to make 2 savable from column view.
So far I've this:
function modify_user_table($column) {
...
0
votes
0answers
30 views
Updating user_meta from pop-up form in back-end
I have created a custom wordpress backend area, which lists out all members on my wordpress site. Currently, there is a point system involved for loyalty rewards, which is maintained in this back-end ...
-1
votes
1answer
45 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
30 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
103 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
21 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
0answers
52 views
How to access current user ID within wp_hash_password() function from plugin?
I am trying to change the way wordpress saves it password, to my own way. I was able to store the password in to the database, the way I wanted, overwriting wp_hash_password() function from my plugin. ...
0
votes
1answer
134 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
63 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 ...
0
votes
1answer
90 views
Getting label name of extra user fields
I'm using the plugin "Extra User Fields" to add extra fields to the user's profile. I know how to get the value of the field (get_user_meta/get_author_meta), but I also want the label as a string, but ...
1
vote
3answers
8k views
add custom field in user register form
In my WordPress based site, I want to add a custom field (e.g. type of user - employee, investor) in the user registration form in the admin side, without editing the core file. Can anyone please ...
0
votes
3answers
49 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
0answers
31 views
cap_key problem when sharing users and usermeta tables with two installation
I'm following this Custom User and Usermeta Tables to share users and usermeta tables with two installation.
define('CUSTOM_USER_TABLE', 'bloga_users');
define('CUSTOM_USER_META_TABLE', ...
0
votes
1answer
22 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
90 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 ...


