Title: Manually call function to load more posts
Last modified: February 3, 2021

---

# Manually call function to load more posts

 *  Resolved [itsViney](https://wordpress.org/support/users/itsviney/)
 * (@itsviney)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/manually-call-function-to-load-more-posts/)
 * 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](https://wordpress.org/support/users/maheshmaharjan/)
 * (@maheshmaharjan)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/manually-call-function-to-load-more-posts/#post-14034347)
 * Hi [@itsviney](https://wordpress.org/support/users/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](https://wordpress.org/support/users/itsviney/)
 * (@itsviney)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/manually-call-function-to-load-more-posts/#post-14035364)
 * 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](https://wordpress.org/support/users/maheshmaharjan/)
 * (@maheshmaharjan)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/manually-call-function-to-load-more-posts/#post-14674857)
 * [@itsviney](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/catch-infinite-scroll/assets/icon.svg?rev=1794357)
 * [Catch Infinite Scroll](https://wordpress.org/plugins/catch-infinite-scroll/)
 * [Support Threads](https://wordpress.org/support/plugin/catch-infinite-scroll/)
 * [Active Topics](https://wordpress.org/support/plugin/catch-infinite-scroll/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/catch-infinite-scroll/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/catch-infinite-scroll/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Mahesh Maharjan](https://wordpress.org/support/users/maheshmaharjan/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/manually-call-function-to-load-more-posts/#post-14674857)
 * Status: resolved