In this example:
Ajax Load More will lazy load a gallery of images from Advanced Custom Fields using the ACF extension.

The Gallery field for Advanced Custom Fields provides a simple and intuitive interface for managing a collection of images –¬†Ajax Load More¬†is used to loop over each image¬†and display the results with infinite scrolling (lightbox functionality is not included).


The following shortcode was used to create the Gallery Field example.

[ajax_load_more preloaded="true" preloaded_amount="4" posts_per_page="4" pause="true" pause_override="true" scroll="true" button_label="Load More" button_loading_label="Loading..." seo="true" acf="true" acf_field_type="gallery" acf_field_name="alm_gallery" seo="true" container_type="div" transition="fade" images_loaded="true"]

The following Repeater Template was used to create the Gallery Field example.

Note: $image will always be the variable name returned from Ajax Load More when using the Gallery field type.