This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

“Load more” button for posts

9 years ago · Last reply by Andrew Misplon 9 years ago

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 :)

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

1
  1. Andrew Misplon Staff 9 years, 6 months ago

    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:

    *-loop.php
    loop-*.php

    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.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread