Support » Plugin: WordPress Infinite Scroll - Ajax Load More » AlmComplete not firing on live server

  • Resolved tomwalshdigi

    (@tomwalshdigi)


    I am using a matchHeight plugin to make sure that the container of all of my posts are the same height, but i need to trigger this when more posts are loaded.

    The load more occurs when you scroll to the bottom of the page, at which point you will see the error.

    This works perfectly on my local machine, but when i push to staging, it doesnt seem to work. The console.log isnt even firing.

    Heres my code:

            $(function() {
                $.fn.almComplete = function(alm){
                    console.log('testing');
                    $(".ajax-load-more-wrap .post-thumbnail").matchHeight();
                    $(".alm-reveal .post-thumbnail").matchHeight();
                };
             });
    
    • This topic was modified 3 months, 1 week ago by  tomwalshdigi.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author dcooney

    (@dcooney)

    Hi @tomwalshdigi,
    I’m just finishing a blog post on this, but can you go to your ALM Setting page and check the ‘Legacy Callbacks’ button to enable this?

    In 5.0 all the callbacks were updated to remove jQuery. THis will enable those legacy callbacks.

    OR you could update your callback function to the following:

    almComplete = function(alm){
       console.log('testing');
       $(".ajax-load-more-wrap .post-thumbnail").matchHeight();
       $(".alm-reveal .post-thumbnail").matchHeight();
    };

    Let me know if this helps.

    @dcooney YES!
    Enabling the legacy callbacks solved the issue immediately!

    Thank you very much!

    @dcooney i am having one other issue, where certain posts are being duplicated? is this a known issue or something you are unaware of?

    Cheers,

    Plugin Author dcooney

    (@dcooney)

    Not aware of this.

    If you take a look at the link i posted, you’ll see the blog post: ‘Versus Arthritis’ is repeated multiple times

    Plugin Author dcooney

    (@dcooney)

    Im not able to view the Ajax Load More section because of an error.
    GET https://grow.digitronix.studio/wp-admin/admin-ajax.php?action=alm_query_posts&nonce=7d491e7cea&query_type=standard&id=&post_id=0&slug=home&canonical_url=http://grow.digitronix.studio/the-bulletin/&posts_per_page=4&page=4&offset=0&post_type=post&repeater=default&seo_start_page=1&preloaded=false&preloaded_amount=0&order=DESC&orderby=date net::ERR_CERT_AUTHORITY_INVALID

    But your issue would be you need to offset the loading of posts. Assuming the posts are loaded in the same order.
    [ajax_load_more offset="7"]

    Or you could remove the posts from the Ajax Load More listing using the post__not_in param.
    https://connekthq.com/plugins/ajax-load-more/docs/code-samples/exclude-posts/

    Otherwise Ajax Load More has no idea you have loaded posts before it.

    Hope that helps.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.