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!
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.
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.
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