Forums

Show Posts 10-20 (2 posts)

  1. ntgcleaner
    Member
    Posted 9 months ago #

    So I am trying to create a jquery ajax post for a custom theme with a simple loop, using PHP and Jquery.

    I would like to know if wordpress has a "get posts 10-20".

    I am writing my own code using a wordpress loop. So far, it's basically:

    if the number of posts is greater than 10,
    divide and round up the number of posts by 10,
    while it's greater than 1, add the ajax navigation.
    and i++;

    but now, I need to be able to write a dynamic loop (get_posts(10-20)) that, when I click on "Page 2", it will show posts 10-20.

    I can't use $paged because it messes with the custom site I made, so I would like to ajax post the "pages".

  2. ntgcleaner
    Member
    Posted 9 months ago #

    I found it, offset=10

Reply

You must log in to post.

About this Topic

Tags