The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
2answers
141 views

Display list of users who have made at least 1 post

What I would like to do is have a list of users who have contributed at least one post. I need to show the following: [User photo] | [User Name] | [User post count] e.g. [photo] Joe Bloggs(8) I ...
0
votes
0answers
10 views

Logging in user automatically from non-WP ASP.net site?

At the time I was brought in, the client had a fully WP site and I had specific tasks to built surveys and reporting available only to logged in users. Since completion, the client's other developers ...
0
votes
2answers
18 views

Is a user_meta research case-sensitive or not

I am using the Wordpress get_users() function to search for users with a specific meta_key value. $wordpress_user = get_users( array('meta_key' => 'unique_id', ...
0
votes
2answers
29 views

Cannot retrieve active members only

Below is a page template where I'm trying to retrieve active members metadata (of Restrict Content Pro). Displaying users' meta is working just fine; but I can't get ONLY active members to display, ...
0
votes
1answer
93 views

Get author meta of all writers

We know from the docs that you can get an author's meta like so: <?php get_the_author_meta( $field, $userID ); ?> But I would like to have a custom "About us" page which displays all the ...
0
votes
1answer
46 views

Wordpress where clauses in db select

I'm currently struggling with implementing a feature for wordpress site. I would like to get the count of all users which have the key pending_approval='true' and is_photographer='true' (located in ...
0
votes
2answers
146 views

Order get_users() by last login date. Is it possible?

I want to create a page that displays all the blog users ordered by the last login date. I've tried with the get_users() function and I can succesfully get the users' list, but not in the order I ...
1
vote
2answers
84 views

Displaying a random user with a shortcode

I'm trying to setup a shortcode to show a single random user each time the page is refreshed. I've been successful in displaying all users or a select user by the user ID. Here is my shortcode as it ...
0
votes
0answers
34 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.
0
votes
1answer
98 views

get_users() ORDER BY Not Working

I'm not sure where the problem lies, but the code below just doesn't have the effect of ordering by ID in descending order. $args['role'] = 'subscriber'; $args['orderby'] = 'ID'; $args['order'] = ...
0
votes
1answer
73 views

Order users by number of posts (includes custom post type)

I am using the function below to count posts for users (including custom post types). I am putting together a list of users and want to order them by this count function. The orderby options for the ...
1
vote
2answers
264 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
25 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
206 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
114 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'] = ...
0
votes
1answer
134 views

Query to get last posts from authors of blog

Firstly I get user with role "author". $author_args = array( 'role' => 'author' ); $authors_list = get_users($author_args); Nextly I reform array $author_list = array(); ...
1
vote
1answer
193 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
1answer
72 views

Update user from external script

I am using the API code of WordPress to update some fields of user profiles but I am having some problems. When I try to save information, it is not updating unless I click twice. For example for ...
1
vote
2answers
494 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
61 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
56 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 ...
0
votes
1answer
44 views

how to get the top 10 popular blogs

Our wordpress sites have many many users, each of them have an blog account, they can write posts,comments and so on. Now I want to find out the top 10 popular blogs, according to or order by ...
2
votes
2answers
81 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 ...
0
votes
1answer
165 views

Can't manage to make translate_user_role() work

I've been looking into wpse archives to solve my problem but I can't manage to do such a thing. I built this code : $args = array('fields' => 'all_with_meta'); $users = get_users($args); foreach ...
0
votes
2answers
57 views

Custom search by several options send on form not works

I am using the Advanced Custom Field Plugin to add custom fields for the users profiles and display a list of users in the frontend of site with Simple User Listing Plugin. I need to filter a list of ...
0
votes
1answer
285 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 ...
2
votes
2answers
686 views

Sort get_users by custom field

I have a custom USER taxonomy called 'label' which also has a custom field of 'sort_order' - I am trying to return a list of users that have the label taxonomy and then sort this list by the ...
1
vote
1answer
299 views

Order the users by the date of their latest post

I use the following code for getting the authors of in my multi-author blog and order them by their post count. I want to order them by the date of their last post $authors = ...
1
vote
2answers
191 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
300 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
134 views

Query Users by post count, last 30 days and display each users post count according to post type

I'm almost done, the code below does everything but display post count for each user broken down into post types, and also I'm like to filter it last thirty days. I'm trying to get the post for each ...
4
votes
1answer
516 views

Custom post type support for get_users('orderby=post_count');

The default WordPress function get_users('orderby=post_count'); only orders users with the count of the posts they've made. Any idea how to modify this to support custom post types as well? UPDATE: ...
0
votes
1answer
492 views

Redirect to current user page upon link click

I hope this problem does not have too complicated of a solution. I also hope it isn't too easy so I don't feel like a fool for not figuring it out :) On my website, (Wordpress), I have Peter's ...
3
votes
1answer
378 views

How to display the names of users from a specific group with a shortcode?

I have in the database a table with the user_id and corresponding group_id values, so each row contain the ID of the user that is a member of a group and the related group ID. The question is: How to ...
0
votes
1answer
345 views

Convert usernames listed by the Groups plugin shortcode to displayed names?

I have created a group with the Groups plugin and I want to display the members list of that group. I put the shortcode [groups_group_info group="Group Name Here" show="users"] in a page, but it ...
0
votes
1answer
1k views

get_users meta_query

I can't get meta_queries working correctly on get_users(). For the life of me can't figure out what I'm doing wrong. $args = array( 'meta_query' => array( ...
0
votes
1answer
145 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 ...
1
vote
1answer
309 views

Author List page: Exclude based on last post date

I have a Author page that I built using this code and it works fine. However, I have several writers that range from frequent to one-time writers. I would like to seperate out writers that have not ...
1
vote
2answers
274 views

How may I filter get_users() similarly to pre_get_posts?

I have filtered posts, pages and custom_post_types based on $current_user custom usermeta field values using pre_get_posts(). Is there a similar method/function to alter get_users() based on ...
1
vote
1answer
559 views

Sort users in get_users() in custom order

<?php $blogusers = get_users('include=5,6,2,7,12,8'); foreach ($blogusers as $user) { ... } ?> Right now these users will sort by first name. How do I sort this the order the numbers ...
0
votes
1answer
147 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 ...
1
vote
1answer
936 views

How to do get_users() with multiple meta_keys

In the codex it says its possible to do get_users() with multiple meta keys by using the meta_query parameter but it doesn't explain how. Can someone give me an example?
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. ...
-2
votes
1answer
139 views

Get all user with both meta_value

I was wondering if there were any efficient way of fetching all user comparing two different meta_key. I am currently fetching all user compared to the first meta, then loop trough the user_id to ...
2
votes
1answer
870 views

Can I pass two roles to the function get_users?

I want to get the users of role academic and student. I have tried using the code below (passing an array of roles, but all users are being displayed, so clearly it's not working. ...
0
votes
2answers
365 views

List users with the most total posts view

I'm asked by my friend to create a widget for his multiauthor blog. He wants to list 3 authors with the most total post view from their posts. I've got the job done for the post view using post ...
0
votes
1answer
810 views

Override orderby to create list of users by custom meta_value

I'm having issues ordering a loop of users by a custom meta_value. Reading the Codex for get_users(), it doesn't actually say that you can use the meta_value for orderby. When I try to do it I get a ...
0
votes
1answer
805 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
563 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 ...