Userlisting

Customizable Userlisting

To create a page containing the users registered to this current site/blog, insert the following shortcode in a (blank) page:
[wppb-list-users].

For instance, to create a userlisting shortcode listing only the editors and authors, visible to only the users currently logged in, you would use:
[wppb-list-users visibility="restricted" roles="editor,author"].

If not specified in the short-code as argument, the default value for:

  • visibility: “public” ( = anyone can see the userlisting, even visitors not logged in), or “restricted” ( = only logged in users can see the userlisting)
  • roles: * ( = list all the users)

For instance, for a simple userlisting, use: [wppb-list-users].

General Settings

Number of users/page – defines the number of users displayed on each page. This setting applies to the all-userlisting.
Default Sorting Order – defines the default (first option) sorting order. This setting applies to the all-userlisting.


The “All-Userlisting” Template

Avatar size – sets the avatar size on the all-userlisting. This overrides the avatar size set in the extra fields, or the default value from WP, so that in case of a list, the avatar can be set to different sizes, in order to cover the area next to the text.

Insert “Sort by” Fields – selecting (clicking) one item from the list, inserts automatically (at current cursor position) a sort by fields (either default or custom). When rendered in the front-end, this will translate into a link which once clicked will sort the users by that given field.

Insert “User-Meta” Field – selecting (clicking) on one item from the list, inserts automatically (at current cursor position) a user-meta field (either default or custom). When rendered in the front-end, this will return the values for each user. Must be used within a “%%extra_while_users%%” and %%extra_end_while_users%% conditional tags, selected from the “Insert Extra Functions” select. Recommended to be used with the same “sort by” fields.

Insert Extra Functions – selecting (clicking) on one item from the list, inserts automatically (at current cursor position) extra functions (for instace: custom user-while’s or a search form).


Populating the textarea can be either achieved by writing valid HTML code manually, or by clicking the “Show/hide Default “All-Userlisting” Code”, and then copy-pasting the existing HTML code.
Note:

  • the above settings only apply to the all-userlisting
  • regarding the search feature: by default setting (true), all fields (even the custom ones) will be searched. By setting the “wppb_userlisting_search_all_fields” filter to false, this will only search in some of the (default) WordPress fields – this would decrease page load time in case of a big database.



The “Single-Userlisting” Template

Insert “User-Meta” Field – selecting (clicking) on one item from the list, inserts automatically (at current cursor position) a user-meta field (either default or custom). When rendered in the front-end, this will return the value of a given field for the current user.

Insert Extra Functions – selecting (clicking) on one item from the list, inserts automatically (at current cursor position) extra functions (at the moment there is only the “go back” link, but more might follow).


Populating the textarea can be either achieved by writing valid HTML code manually, or by clicking the “Show/hide Default “Single-Userlisting” Code”, and then copy-pasting the existing HTML code.

When populating the two textareas (allUserlisting and singleUserlisting) you can insert functions to your current cursor position and also you can use the Tab button. Also, using custom classes and id’s is possible if these are defined in the currently active theme’s CSS file (except the existing ones; these are already defined in the plugin’s CSS files).