WP Rest API, reset pagination when fetching posts from a new category

Question

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
0
, Sergi 2 years 2019-10-27T18:12:03-05:00 0 Answers 95 views 0

Leave an answer

Browse
Browse