Looking For Something?

[wps-friends]

Purpose

Displays a user’s friends.

This is the basic shortcode that displays a user’s set of friends on the site. From the list, the can choose to “unfriend” or visit that user’s own profile page.

Availability

Provided in the Core Plugin.

Customising

You can use the global shortcode settings via WPS Pro->Shortcodes in the admin dashboard, or add them to the shortcode as options.

Example

List friends, showing up to 99, and an avatar of size 128px x 128px:

[wps-friends count="10" size="128"]

To display the list of friends for a user, you would put the following shortcode on a WordPress page, setting the maximum number to 100:

[wps-friends count="100"]

To show as a fluid grid, you would use:

[wps-friends layout="grid"]

Options

The following (which shows default values and an example of using the shortcode option) can be set via the admin dashboard (WPS Pro->Shortcodes) or added as options to the shortcode in your WordPress page, post or widget.

Number of friends to show (count=”10″)
Avatar size (size=”64″)
Link display names to profile page (link=”1″)
Show when last active (show_last_active=”1″)
Text for when last active (last_active_text=”Last seen:”)
Format for when last active (last_active_format=”%s ago”)
Text for private (private=”Private information”)
Text for no friends (none=”No friends”)
Layout (layout=”list”)
Logged out text (logged_out_msg=”You must be logged in to view this page.”)
Remove all friends option (remove_all_friends=”1″)
Remove all friends text (remove_all_friends_msg=”Remove all friends”)
Remove all friends confirmation (remove_all_friends_sure_msg=”Are you sure? This cannot be undone!”)
Optional URL to login (login_url=””)
Sidebar