• Resolved itsViney

    (@itsviney)


    I have a site that I’m using Catch Infinite Scroll on that also has some basic filtering functionality to hide certain posts. The problem is, sometimes it can hide enough posts that the bottom of the page becomes visible but because there wasn’t a scroll event, the trigger to load more posts isn’t hit.

    I’d like to tweak the filter function so that it automatically triggers more posts to load if the remaining posts is lower than a certain number, but I can’t find the correct js function to call in CIS. Looking through the code, it looks like I should be able to call ctis_load_more(); but that doesn’t seem to work.

    Is there a function I can call to arbitrarily load more posts?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Mahesh Maharjan

    (@maheshmaharjan)

    Hi @itsviney,

    Selecting “Scroll” in Load on/Trigger on option should trigger the load more event as we scroll through the page.
    Please post in your site URL.

    Regards,
    Mahesh

    Thread Starter itsViney

    (@itsviney)

    Sorry Mahesh, I don’t think I was clear enough. I already have the trigger set to on-scroll, however the issue is that in that mode it’s listening for an actual scroll event to trigger the load. On my site, it’s possible to reach the end of the list of posts without actually scrolling…

    Say there are 20 posts visible that extend beyond the height of the viewport, then the user clicks a filter and 18 of the posts disappear, leaving only 2. Now, we’re at the bottom of the post list but the user hasn’t actually scrolled anywhere and now isn’t able to scroll because the page doesn’t extend beyond the bottom of the window. There’s now no way to load more posts.

    I know this is probably a very niche use case, but I was hoping to be able to write my own JS to force more posts to load at the same time as filters being applied, to avoid this scenario.

    Plugin Contributor Mahesh Maharjan

    (@maheshmaharjan)

    @itsviney: Does the issue still persist?

    Please post in your site url.

    Regards,
    Mahesh

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Manually call function to load more posts’ is closed to new replies.