Hello.
I’ve got a problem of this kind: I need to make a “Load more button” for post query.
Here is how I see it — when user loads the page, it’s going to show only 8 posts, but when user presses the button, posts will add by 4 each time, up to 24 posts, and then button disappears.
So, if it’s possible to make it with WP_Query, how does “Build Posts Query” works in Page Builder? Where can I change these parameters in code, not in Page Builder UI?
Explained as clear as I can :)
“Load more” button for posts
This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.
Hi Vlad
Thanks for posting your question, sorry we weren’t able to reply sooner.
With our own themes, we use Jetpack Infinite Scroll and this can be used in conjunction with the Post Loop widget. The Post Loop widget is a built in Page Builder widget that can use templates named as follows:
Out of interest, you can see us adding this to our Focus theme at the moment in this PR: https://github.com/siteorigin/focus/pull/29. Here are the changes made so far: https://github.com/siteorigin/focus/pull/29/files.
In addition, we added loops to be used with the Post Loop widget: https://github.com/siteorigin/focus/tree/develop/loops.
I realise that if you’re building your own infinite scroll widget then this isn’t really helpful but it is unfortunately the limit of what we can offer here on the forums.