The directory is a very easy way for members to find other members on the site. In its basic form it’s a list of members, with a search form, but through the shortcodes there are additional features available.
The easiest way to add your directory is to use the “Add Directory Page” button on WPS Pro->Setup which adds a new WordPress page, with the following shortcodes, that you can then add to your site’s menu:
Adding Profile Extensions to the Directory
Any profile extensions that you’ve set up can be shown along with the user on the directory, by adding options to the [wps-directory] shortcode:
Comma seperated list of profile extensions to show.
Comma seperated list of either ‘left’, ” to float the labels accordingly. Count of values must match count of profile_extensions option.
Whether or not to show the profile extension label (title). Count of values must match count of profile_extensions option.
Provided in the Extensions Plugin.
You can use the global shortcode settings via WPS Pro->Shortcodes in the admin dashboard, or add them to the shortcode as options.
To display the directory, including the currently logged in user and doubling the default avatar size, you would use the following options:
[wps-directory avatar_size="128" include_self="1"]
To show the basic search field and results, see the quick start section earlier. To show as a drop-down list that filters as your type, you would use the mode parameter. Not that placeholder is probably worth changing from the default value.
[wps-directory-search mode="list" placeholder="Click and start typing..."]
You can split the two shortcodes, so for example, you can have [wps-directory-search] in a Text/HTML widget, with the url option set to a WordPress page, on which, you have the [wps-directory] shortcode, which will pick up any search term entered.
Adding to the Directory
Assuming you have two profile extensions with slugs of gender and date-of-birth, you can show them on the directory as follows:
By default, the profile extension title will be shown as a label, but you can set each of the above not to sure as follows:
[wps-directory profile_extensions="gender,date-of-birth" profile_extensions_labels="0,0"]
Or if you wanted to show the label for date-of-birth but hide the label for gender (perhaps as it’s obvious):
[wps-directory profile_extensions="gender,date-of-birth" profile_extensions_labels="0,1"]
Which would display something like: