The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
869 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 = ...
1
vote
2answers
570 views

Menu page with list of users

I need a way to create a menu page with a list of all users for administrative purposes. The list will be used by users that don't have permission or acceses to the "Users" menu page. The page need to ...
2
votes
1answer
672 views

How can I query all users who registered today?

I'm trying to use meta_query to return all users that have registered today : $args = array( 'meta_query' => array( array( 'key' => 'user_registered', ...
5
votes
2answers
843 views

get_users is expecting unserialized meta_value

I'm trying to get all users assigned to a custom usermeta. I know that get_users() is supposed to work; however, it doesn't seem to be working. What I have is a usermeta storing a category ID and I'm ...
2
votes
6answers
7k views

Get multiple roles with get_users

I've got some code like this: $query_args = array(); $query_args['fields'] = array( 'ID', 'display_name' ); $query_args['role'] = 'subscriber'; $users = get_users( $query_args ); foreach ($users as ...
1
vote
1answer
4k views

Getting all user metadata from user

I am trying to show bio and other custom metadata for my users in a page. So, i want to query the user metadata table for it. I have tried but did not find any functions for that. What i am looking ...
1
vote
1answer
213 views

Users: List A to Z, for Users

I would like to create a list of all the alphabets that represent each user in my site. Example: A -> Link that shows list of all users whose **nickname** starting with letter "A" B -> ...
5
votes
2answers
342 views

Why does get_users suddenly return duplicates?

I'm having a hard time figuring this one out. I'm running a simple users query : $args = array( 'role' => 'custom_role', 'orderby' => 'ID', 'order' => 'DESC', 'number' => ...
0
votes
1answer
750 views

Create a page Meta Box listing all blog users

I have a custom post type where each post can only be seen on the frontend by one specific user. I have figured out how to make an archive template where only posts with the meta _allowed_user = ...
1
vote
1answer
757 views

How to use “offset” to paginate get_users?

Is is possible to paginate the get_users function with the "offset" parameter? I have complete my custom query of users for my list and now I need to paginate the results into multiple pages. Here ...
1
vote
1answer
798 views

Get users with atleast one post

How can I get all users with atleast one post? I don't think it's possible with get_users function.
1
vote
1answer
1k views

How to list users that have written custom post types and hide the ones that have not?

I'm trying to build an author list that would show all authors that have written a Custom Post Type post, and hide authors that have no posts. With wp_list_authors it would be easy to show users that ...
3
votes
1answer
1k views

How to paginate the get_users function?

Im using the get_users function to show a custom list of users on the site. The only issue Im having a problem figuring out now is how to paginate the result. This is a sample of the function that Im ...
0
votes
1answer
962 views

How to count get_users query?

I have been searching high and low for a way to count the amount of results from a get_users query. Most of what I found is to count the total number of posts in a post query, but nothing for ...
3
votes
2answers
3k views

List users by last name in WP_User_Query

How can I list users by last name ASC when using WP_User_Query? There is an orderby parameter but looking in core it doesn't accept ordering my user meta. Anyone know how to extend WP to allow this ...
0
votes
2answers
2k views

Order users by custom user meta

I'm showing a list of users like so: <ul> <?php $directors = get_users('role=director'); foreach ($directors as $director) { $dir_id = $director->ID; ...
0
votes
5answers
2k views

Order by first name

I'm trying to order the member list by display_name or first name ASC. http://sim.is/sim/felagatal-sim/ This doesn't seem to work. Any pointers out there? :/ $users = get_users(array( 'role' ...
0
votes
1answer
495 views

trying to list users & display first - last name

For some reason this is not working for me :( $get_members = array( 'blog_id' => $GLOBALS['blog_id'], 'role' => 'sm_flagar', ); $blogusers = get_users($get_members); foreach ...
0
votes
1answer
710 views

Best way to get user id for get_users function?

I'm trying to make a table of users by role type. What is the best-practices method of getting the user id? My goal is to print each users first & last names, username and email. What I have now: ...