• Hi team,

    I have slightly modified the plugin and request that you make an update. I created an additional variable like this:

    var itemSelectorCount = $( itemSelector ).length;

    and used it later in the script as follows to trigger the load earlier so that there was no visible delay:

    if (itemSelectorCount >= 6) {
    var t = $(this),
    elem = $(itemSelector).last().prev().prev().prev().prev();
    } else {
    var t = $(this),
    elem = $(itemSelector).last();
    }

    You’ll obviously need to create an additional option that probably defaults to 3 to suggest the point at which triggering takes place.
    You’ll probably need to default the >=6 comparison to reflect the default number of posts displayed on an archive page as defined in settings > read in WordPress.

  • The topic ‘Trigger load more before end of items’ is closed to new replies.