The user-meta tag has no wiki summary.
0
votes
1answer
29 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
0answers
27 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
27 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 ...
1
vote
1answer
28 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
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
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
18 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
38 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
24 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
90 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 ...
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
38 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
22 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
23 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
141 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 ...
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 ...
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?
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
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
206 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
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
1answer
46 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
25 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
31 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
46 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
31 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
104 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
55 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
67 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
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
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
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
23 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
73 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
65 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 ...
1
vote
1answer
92 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
66 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
177 views
How to: get_user_meta - BuddyPress
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 ...
0
votes
2answers
48 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
73 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
103 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' );
...

