In this example:
Ajax Load More will display a custom loading indicator as posts are being loaded from the server.

Using the alm_before_button filter hook and some custom CSS, a loader will be displayed above the ‘Load More’ button.


    Filter

    Use the alm_before_button filter to add a #custom-alm-loader div to the Ajax Load More container.


    CSS

    While posts are loading a class of .alm-loading is added to the Ajax Load More container – we can then use this class to display the custom loading indicator.

     

    The following shortcode was used to create the Custom Loader example.

    [ajax_load_more repeater="template_46" post_type="post, ajax_more" transition="fade" transition_speed="350" images_loaded="true" preloaded="true" preloaded_amount="4" posts_per_page="4" pause="true" pause_override="true" css_classes="flex"]