The Users extension provides a connection point between the User_Query class and Ajax Load More.

With the Users extension activated, you can create an infinite scrolling list of subscribers, authors, BuddyPress users, or any custom role on your site and display information about each user like you would a standard WordPress post or custom post type.


User Roles

When building a custom shortcode you may choose to display all users or select a specific user_role from the list.

For security (and privacy) reasons the users_role parameter is encrypted before any user query is run by Ajax Load More. This extra measure will help prevent data manipulation of the Ajax $_GET request URL.


Repeater Template

When Ajax Load More runs a WP_User_Query the results of the query can be accessed in Repeater Templates by referencing the $user object.

<div class="author">
	<?php echo get_avatar( $user->ID, 72 ); ?>
	<h3><?php echo $user->display_name; ?></h3>
	<p>
		<a href="<?php the_author_meta('user_url', $user->ID); ?>">
			<?php the_author_meta('user_url', $user->ID); ?>
		</a>
	</p>
	<p><?php the_author_meta('description', $user->ID); ?></p>
</div>
HTML

Shortcode Parameters

The following shortcode parameters are available with the Users extension.

usersEnable infinite scrolling of  WordPress users. (true/false). Default = ‘false’
users_roleThe user role to display. Default = null
users_includeShow specific users. Default = null
users_excludeExclude specific users.. Default = null
users_per_pageThe number of users to display with each query. Default = ‘5’
users_orderThe order of the displayed users. Default = ‘ASC’
users_orderbySort retrieved users by parameter. Default = ‘login’

Shortcode Builder

The following screenshot illustrates the process of building a Users shortcode with the Ajax Load More Shortcode Builder.

Users Shortcode Builder Options
Example Shortcode[ajax_load_more users="true" users_role="Subscriber" users_per_page="2" repeater="template_10" seo="true"]

FAQs

Below are common questions regarding the Users extension. If you have a question and don’t see the answer, please visit the support page and submit your request.