Repeater Templates

Ajax Load More uses a templating system referred to as Repeater Templates to manage the front-end display and styling of your Ajax-loaded content.

A Repeater Template is a snippet of code that will execute over and over to display post content within an Ajax Load More loop. Repeater Templates will typically consist of a combination of HTML, PHP, and core WordPress functions such as the_title() and the_permalink().


Default Template

By default, Ajax Load More offers a single editable template that allows users to quickly match the look and the feel of their website to the Ajax-loaded content.

The default Ajax Load More template can be edited and managed using one of the methods listed below:

Standard

The Standard method enables template management from directly inside the Ajax Load More interface.

This Ajax Load More template is fully editable with syntax highlighting enabled and allows for full control over what content is displayed to your visitors. This template is modified within the Ajax Load More plugin interface, saved inside the uploads folder on the server (wp-content/uploads/alm_templates), and stored in the database for backup purposes.

Ajax Load More Repeater Template interface example

Pro Tip: Always open and close your repeater templates with a single HTML element. In some unique cases, data may be displayed incorrectly or not at all.

Theme (alternative)

The Theme method allows for management of the default template from the active WordPress theme directory

Load and manage the default Ajax Load More template directly from the active WordPress theme directory using similar functionality to what’s included with the Templates add-on.

This method makes it easier to reuse templates throughout other sections of a website and also manage the template using a GIT workflow as the template is saved in your codebase.

Screenshot of loading the default template with Ajax Load More from your active theme directory.

To start working with the Theme method, you must:

  1. Create an /alm_templates directory at the root level of your active theme directory.
  2. Create and upload a default.php template file to the /alm_templates directory.

If a default.php template is found in your active theme folder, it will be used as the plugin’s default template and will take priority over others.

NOTE: Your template must be named default.php.


Additional Templates

Users can extend the core Ajax Load More templating system with the Templates add-on.

Templates

Unlimited Repeater Templates with Custom Repeaters

The Templates add-on will unlock the ability to create an unlimited number of Ajax Load More Repeater Templates.

Create, manage, and maintain templates on demand from right inside of WordPress, as well as load templates directly from your active theme directory.