Users
Enable Infinite scrolling of WordPress users
The Users add-on will provide additional functionality for lazy loading WordPress Users with Ajax Load More.
Query and display a listing of WordPress users by role (Authors, BuddyPress Users, Subscribers etc) using a WP_User_Query and Ajax Load More – view example.
Features
A few key features of the Users add-on for Ajax Load More.
Compatibility
Users add-on is fully compatible with the Preloaded, SEO and Cache add-ons.
BuddyPress
Display a listing of BuddyPress users and profiles from your online community.
Add-on Details
Learn more about the Users add-on.
How It Works
The Users add-on works by providing a connection point between the WP_User_Query class and Ajax Load More – this core WordPress class is used for querying users by specific roles.
With the Users add-on activated you can create 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.
When building a custom users shortcode you may choose to display all users or select a specific user_role from the list.
Note: 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 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.
1 2 3 4 5 6 7 8 9 10 |
<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> |
Shortcode Parameters
The following shortcode parameters are available with the Users add-on.
users | Enable infinite scrolling of WordPress users. (true/false). Default = ‘false’ |
---|---|
users_role | The user role to display. Default = null |
users_include | Show specific users. Default = null |
users_exclude | Exclude specific users.. Default = null |
users_per_page | The number of users to display with each query. Default = ‘5’ |
users_order | The order of the displayed users. Default = ‘ASC’ |
users_orderby | Sort 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.
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 add-on. If you have a question and don’t see the answer, please visit the support page and submit your request.
How do I access the current user/author data in my Repeater Template?
The current user can be accessed in an object called $user.
The $user object hold very high level data about the user and in most cases you will need to extract the $user->ID to access additional data.
1 2 3 4 |
<?php // print_r($user); $ID = $user->ID; ?> |
How do I access meta data for an user in my Repeater Template?
To access author meta you must pass the $user->ID to the author_meta() function as follows:
1 |
<?php the_author_meta('description', $user->ID); ?> |
Here is a complete list of available author_meta parameters.
Note: $user will always the object variable name returned from Ajax Load More for each user.
Installation
Upon purchase of this add-on you will receive a confirmation/purchase receipt email. Your receipt will contain a direct link for downloading your copy of Ajax Load More: Users and a license key.
After downloading the add-on, upload the unzipped files to your /wp-content/plugins/ directory or visit your plugins dashboard and upload the downloaded .zip under Add New.
License Activation
To activate your add-on and receive updates directly in your WordPress plugins dashboard users are required to enter the license key that was included with their purchase receipt.
To activate a license key:
- Visit the Licenses section within the Ajax Load More plugin.
- Enter the product key and click Activate License.
- If the status indicator turns green your add-on has been successfully activated (example below).

If you did not receive your confirmation/purchase receipt email and license key, please check your spam/junk folder and if you still cannot locate the email please contact me at darren [at] connekthq.com or use the Product Support form on the website.