As of version 0.4 the plugin comes with a shortcode which can be used to show lists of avatars on a page or inside a post. It’s simple: just add
[authoravatars] into your post and hit save!
Just as for the widget you can use various parameters to configure the list of users.
roles: Only show users of a certain role
Restrict the list of users by roles to show only users belonging to certain roles. Possible values in a default WordPress setup are:
administrator, editor, author, contributor, subscriber. Separate multiple values by a comma.
hiddenusers: Remove users from the list
Hide one or multiple users from the list. Both login names and user ids are allowed as values. Separate multiple values by a comma.
avatar_size: The size of the avatar images
You can adjust the size of the avatar by specifying the avatar_size parameter.
: Disable the link to author pages (deprecated)
This is deprecated since version 0.7. Please use the
user_link parameter instead.
By default user avatars are linked to their Author Page. If your theme doesn’t support them or you don’t want to show them e.g. for subscribers, then you can easily disable them by setting this parameter to false.
user_link: Link user avatars to user website, blog or authorpage
As of version 0.7 you can link users not only to their respective Author Page but also their website if available or blog on WordPress MU sites.
Version 0.7.3 adds the option to link users to their respective BuddyPress Members page.
- last_post_all (wpmu only)
bp_memberpage(only if BuddyPress installed)
bppress_memberpage(only if bbpress installed)
um_profile(only if Ultimate Member is install)
- any field in the get_the_author_meta that returns a URL ( contact info ) ( version 1.9.7 + )
As of version 1.9.7 you can pass a comma-separated list to this as fall through if a URL is not found in first selection
show_name: Show user names next to avatars
If you’d like to show the user display names next to the avatars set the
show_name parameter to true.
show_biography: Show user biographies next to avatars
If you’d like to show the user biographies next to the avatars set the
show_biography parameter to true.
show_postcount: Show the users’ post count next to their name
Set this option to true to show a user’s postcount next to their name (in brackets). If the user name is not displayed (see “show_name” parameter) then the postcount will be shown within the title of the image, i.e. it can be seen on mouse-over.
min_post_count: Set a required minimum number of posts
Since version 0.8 you can only show users which have a specified number of posts. This allows for example to hide all authors which have not written any posts yet.
limit: The maximum number of avatars shown
order: The order in which users are shown
Users are ordered by their display name A-Z by default. You can adjust this by changing this parameter. Possible values are: random, user_id, user_login, display_name, post_count (0.7+), date_registered (0.7+).
page_size: Max number per page
With this set paging markup (“< 1 2 3 4 5 >”) will be displayed below the avatars block.
The avatars are reloaded via ajax.
Note: this code is only used in the shortcode in page or post and not in a widget.
sort_direction: The direction in which users are ordered
As of version 0.7 you can specify the sort direction, ascending or descending.
Valid values are “asc” or “ascending” (default) and “desc” or “descending”.
[authoravatars order=date_registered sort_direction=descending]
You can also use this shorter version:
blogs which blogs to show authors from
This is only for multi-site (WPMU) mode.
Before you use this you need to grant a site permission to see other blogs in the site on the network admin control panel
Without this parameter we only look at the current blog to List authors from all blogs add “blogs-all”
or just some blogs
Note: Use with care as on big sites this will tax the server as SQL gets very big and number of images being fetch grows
render_as_list: Change the rendering template to a list. (deprecated)
This is deprecated since version 0.7.3. This option is probably going to be removed once a more advanced template system is in place. You can get the same effect by using userlist template filters as described in the Developers Guide.
Set this parameter to true, if you would like the list of users to be rendered using a html list (<ul>) instead of a bunch of <div>s. The plugin’s default style sheet renders these lists a normal list (avatars underneath each other) instead of all next to each other (float-ed).