Frequently Asked Questions


General Questions

Where do I download Ajax Load More?

Ajax Load More is available for download from the WordPress Plugin repository.

What are the steps to getting Ajax Load More to display on my website?

  1. Create your shortcode
  2. Add the shortcode to your page by adding it via the content editor or placing it directly within one of your template files.
  3. Load a page with your shortcode in place and watch Ajax Load More fetch your posts.

Pro Tip: Visit the Help section inside the Ajax Load More plugin for a visual implementation guide.

What are my server requirements?

Your server must be able to read/write/create files. Ajax Load More creates the default repeater on plugin activation and in order to modify the output it is required to write to the file as well.

Does Ajax Load More have any JavaScript dependencies?

No, Ajax Load More 5.0 removes all JavaScript dependancies including jQuery.

How are Repeater Templates saved?

Repeater Template data is saved into a custom table in your WordPress database and written directly to a template (default.php) file within the WordPress uploads directory under the alm_templates folder.

Can Ajax Load More infinite scroll single posts?

Yes, with the help of the Single Posts add-on.

Is Ajax Load More compatible with WooCommerce?

It is, but requires modification to WooCommerce template files. Luckily, we have published a quick start guide for infinite scrolling with WooCommerce.

How can I restore the default Repeater Template?

Copy and paste the copy snippet below into your template.

What is the do_shortcode method of implementing Ajax Load More?

The do_shortcode method simply refers to the manner in which a shortcode is added to your website.

do_shortcode is a WordPress function that to is used to allow shortcodes to be rendered in backend scripts and template files.

When implementing Ajax Load More on archive pages or custom page template you will most likely be required to use this method.

When adding a shortcode through the WordPress content editor to a simple page, you do not need do_shortcode and can use the shortcode as plain text.

Why are the post thumbnails an incorrect size in my Ajax Load More listing?

This issue appears most often because prior to activating Ajax Load More your theme was not resizing uploaded media to exactly 150×150 as required by the default repeater template.

When activated, Ajax Load More adds an image size of 150×150 (alm-thumbnail) to your theme so all future uploads will be resized into proper dimensions for display.

If updating the default repeater to use an image size already in your theme is not an option we recommend using the Regenerate Thumbnails plugin to batch process your previously uploaded media library images.

Note: Don’t forget to back up your site prior to running the thumbnail regeneration process.

Can I make a donation to the development of Ajax Load More?

Yes, please visit https://connekthq.com/donate/ and you will be redirected to PayPal.


Developers

Can Ajax Load More be used without the shortcode?

Yes, in Ajax Load More 4.1.0, I quietly released a new alm_render function that provides a method to initiate Ajax Load More without the use of a shortcode.

In the code sample above, I’m passing shortcode parameter values as an $args array.

How can I access custom fields in a repeater?

To access custom field values in a Repeater Template you must define global $post; at the top of the repeater and pass the $post->ID to the custom field function.

The example below illustrates how to access standard post meta fields as well as fields create with Advanced Custom Fields plugin.

Can I count posts within an Ajax Load More loop?

Yes, Ajax Load More provides various templates variables that are available for use within repeater templates. Please see the Variables section for more details.

Can I order posts by 'random'?

Yes, however not out of the box. Ordering by random requires a custom query to be run before the Ajax Load More shortcode – view  code sample.

How can I remove the alm-thumbnail image size?

You can remove the alm-thumbnail image size by adding the following snippet to your functions.php.

Can I display a message to the user when there are no posts to display?

Yes, the almEmpty callback function can be used to render a message to visitors.

How can I hide the 'Load More' button when no posts remain?

When zero posts remain in an Ajax Load More query the Load More button will receive a class of done – you can target this element with CSS to hide the button.

Can I disable Repeater Templates from being written to the database?

Yes, in your wp-config.php add the following ALM constant.

With this constant defined, ALM will not save data to your database.

Pro Tip: Use the Theme method to load Repeater Templates from your theme directory.


Errors

Custom JavaScript click events are not working in repeater templates

To trigger click events on dynamically created content you need to make use of the jQuery .on() event handler.

SyntaxError: Unexpected token A in JSON at position 0 at JSON.parse

This error can mean you have issues in your Repeater Template or your server is preventing access to wp-admin/admin-ajax.php.

If this error occurs, check the browser console > Network > Response and look for the following error:

Accessing author info via REST API is forbidden.

If this error is present, the All in One WP Security and Firewall plugin is blocking access. This can be resolved in the plugin settings, see this article for more information.

Uncaught TypeError: Cannot read property 'style' of undefined

This error usually means there is an extra closing div (or other container type) in your Repeater Template. This can cause ALM to lose it’s reference to the load more button.


Add-ons

Can I activate my license for use on development/localhost and a production websites?

Yes, you can activate a license on both instances, however your development/localhost website must follow one of the following domain patterns.

  • localhost
  • 10.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16
  • *.dev
  • .*local
  • dev.*
  • staging.*

Can I upgrade to more sites after a purchase?

Yes, to increase/upgrade the number of available license activations, log into your account and then visit Purchase History > {Product} > View Licenses > Upgrades.

All license upgrades are discounted at a prorated charge where you only pay the difference.

How can I print an invoice from an addon purchase?

Invoices can be saved and printed from the Account > Purchase History section on the website.

If you did not create an account, send us a support request and provide the email used when purchasing and we can set one up for you.

When updating an add-on there is an 'unauthorized' error. How can I solve this?

If you are receiving an unauthorized error when updating an add-on, please try deactivating and then re-activating the license(s) from Ajax Load More > Licenses. Once you’ve done that, try running the update again.

If the issue persists, send us a support request and provide each license key so we can confirm license activations.