Skip Navigation

[Resolved] I need to create a page that shows all users + roles + phone, email fields +

This support ticket is created 7 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by JeanJ2365 7 years ago.

Assisted by: Luo Yang.

Author
Posts
#513870

I am trying to: Create a page for the ADMINS of the site, that shows a list of users - BY ROLE, with basic user info such as Name, Phone, Email, User Role, etc.

I visited this URL: NA

I expected to see: NA

Instead, I got: NA - I just do not know how to do this!

#513937

Dear Jean,

What do you mean the "BY ROLE"?
Are you going to order the users by user's role?
If it is, there isn't such a feature within Views, Views is using wordpress class "WP_User_Query" to query the users, see wordpress document:
https://codex.wordpress.org/Class_Reference/WP_User_Query#Order_.26_Orderby_Parameters

There is't such an option to sort the users by user's role.

In your case, I suggest you create different view for each user's role, put them into the same page as the order you needed.

To display the user's info field, please try with the Views shortcode [wpv-user]
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-user

Display user info. If the shortcode is inside a Views user query, it will display information for the user found in loop. Otherwise it will display information for the current logged-in user or the user with the specific id, when id attribute is set.

#515915
VIEW-GRID-FIELDS.jpg
view-table-grid - Copy.jpg

Luo,

Ok - I did figure a lot of this out.

I do have a problem still.

I have set up this view as a TABLE GRID.
Checked DO NOT SHOW LOGGED USER.

And then made a template page for this view.

But it is showing THE ADMINISTRATOR INFO at the very top.

#516324

What do you means this:
But it is showing THE ADMINISTRATOR INFO at the very top.
If you do not want to show the users of role "Administrator", you can edit your view, in section "Content Selection", disable the option "Administrator".

in your screenshot:
hidden link
There are some text are outputted above other results, which is abnormal, I suggest you try to follow our document, to setup a new view, and test again:
https://toolset.com/documentation/user-guides/view-layouts-101/#grid

#516512

Thank you.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.