0
votes
0answers
33 views

How to get the list of users logged in to wordpress and expose it in JSON?

Is there a way to get the list of users logged in to wordpress site and expose it in JSON? Please throw some lights to achieve this.
1
vote
2answers
240 views

global $current_user not current user

I believe I have a misunderstanding of what the global variable $current_user is exactly. I'm attempting to display the current user's email and name on a page using add_filter('the_content', ...
1
vote
0answers
23 views

How to get Role Subscribe Users on Admin Menu only in Pages in Wordpress

How to get Role Subscribe Users on Admin Menu only in Pages in Wordpress and also asign pages to only a specific user and also get the pages on homepage by user ID. Example: here a link, i want to ...
1
vote
2answers
182 views

Efficiency on displaying random authors based on large database

I'm trying to display a list of 5 authors randomly. Here are some solutions I had found: http://stackoverflow.com/questions/5502609/get-authors-randomly ...
1
vote
2answers
97 views

Adding tags and inputs to a user's profile

I'm adding a number of items to the user profiles using this method in my functions.php function modify_contact_methods($profile_fields) { // Add new fields $profile_fields['twitter'] = ...
1
vote
2answers
434 views

Get author id from url

I am trying to get the authors user_id on a page linked to by using get_author_posts_url(),. For example http://example.com/author/John%20Smith where John Smith is user_id is 23. I need to get ...
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
53 views

Custom Rewrite for Profiles

I'm currently trying to modify my rewrites to allow for an additional URL segment e.g. http://example.com/vendors/username/ by default WP allows for additional numeric segments but everything else ...
2
votes
2answers
78 views

Paginate a list of users?

I'm currently displaying a list of all users using the following code. The only problem is that I need to paginate and only display 10 users at a time. I'm familiar with pagination using CPT's and ...
1
vote
2answers
177 views

Getting all the users who have author privilege

Can anyone tell me how to get all the users who have author privileges by querying the DB in WordPress and order them by number of posts written by them. I use the following query to get all the ...
0
votes
2answers
288 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
138 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
1answer
141 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
1k 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 ...
0
votes
1answer
2k 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. ...
0
votes
1answer
772 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
545 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
582 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', ...
1
vote
1answer
209 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 -> ...
1
vote
1answer
701 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
705 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
951 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 ...
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
1k 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
1answer
643 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: ...