Title: Loading post function
Last modified: March 23, 2025

---

# Loading post function

 *  Resolved [franckamizet](https://wordpress.org/support/users/franckamizet/)
 * (@franckamizet)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/loading-post-function/)
 * Hi there !
 * First point : I’ve got a JS function on my page which detects the scrollTop position:
   OK
 * What I want to perform : fire the “loading filter params dataset” function when
   my scrollTop is a specific number in order to automatically load posts by scrolling
   down to a specific position from the bottom page (like some other page examples
   with automatic ajax content loader feature)
 * Which “loading filter params dataset” function could I use and fire with my trigger
   please ? and how to send these Filter params dataset in order to load the next
   ajax content ?
 * Is there any other solution to achieve this automatic loading ajax feature by
   scrolling down ?
 * Thank you for your great plugin and your help !
    -  This topic was modified 1 year, 2 months ago by [franckamizet](https://wordpress.org/support/users/franckamizet/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [YMC](https://wordpress.org/support/users/wssoffice21/)
 * (@wssoffice21)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/loading-post-function/#post-18377236)
 * Hi!
   You should use the API JS plugin see documentation [https://github.com/YMC-22/smart-filter#js-api-filter–grids.](https://github.com/YMC-22/smart-filter#js-api-filter--grids.)
   You should first stop loading posts using the hookwp.hooks.addAction(‘ymc_stop_loading_data’,‘
   smartfilter’, ‘callback(elem)’);Then, after that, get the data of the filter 
   params object using JSON.parse(). After that, pack the changes again using JSON.
   stringify() and then make a request using the API plugin method, for example,
   YMCTools({target: ‘.data-target-ymcFilterID-LayoutID’}).apiGetPosts();This whole
   algorithm involves making changes to the plugin settings with subsequent creation
   and launch of the request. We hope this will help you to implement your task.
    -  This reply was modified 1 year, 2 months ago by [YMC](https://wordpress.org/support/users/wssoffice21/).
    -  This reply was modified 1 year, 2 months ago by [YMC](https://wordpress.org/support/users/wssoffice21/).
 *  Thread Starter [franckamizet](https://wordpress.org/support/users/franckamizet/)
 * (@franckamizet)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/loading-post-function/#post-18377242)
 * Great ! Thanks a lot ! 🙂
 *  Plugin Author [YMC](https://wordpress.org/support/users/wssoffice21/)
 * (@wssoffice21)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/loading-post-function/#post-18377254)
 * Good Luck!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Loading post function’ is closed to new replies.

 * ![](https://ps.w.org/ymc-smart-filter/assets/icon-128x128.png?rev=3354891)
 * [YMC Filter](https://wordpress.org/plugins/ymc-smart-filter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ymc-smart-filter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ymc-smart-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/ymc-smart-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ymc-smart-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ymc-smart-filter/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [YMC](https://wordpress.org/support/users/wssoffice21/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/loading-post-function/#post-18377254)
 * Status: resolved