0

I am using ajax and the Wp Rest API to fetch posts from different categories. When I click on a category link, the posts from that category are loaded into the page. What pagination options do I have in this case to reset the pagination every time I make a new API call? I am using this endpoint:

/wp-json/wp/v2/posts?categories' + id
  • 2
    When you make an API call you always get the same result, you have to specify that you want page 2 in order to get it, it doesn't auto-increment, or have I misunderstood? Also your URL is missing an = – Tom J Nowell Oct 27 at 23:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.