• Resolved maniacaldesign

    (@gladneyc)


    I’m able to make an $http.get request using a number of the filter parameters but for some reason the paged parameter doesn’t seem to be allowing me to choose the posts from the 2nd, 3rd paginated page and is instead being ignored.

    $http.get('/wp-json/posts?filter[posts_per_page]=3)
    WORKS

    $http.get('/wp-json/posts?filter[posts_per_page]=3&filter[order]=ASC)
    WORKS

    $http.get('/wp-json/posts?filter[posts_per_page]=3&filter[order]=ASC&filter[paged]=2')
    DOESN’T WORK – it shows the same thing as the previous example: posts 1-3 in ascending order vs my expected posts 4-6.

    Am I missing something or is this perhaps broken in the API currently?

    Side question (hope this is ok ?? ) – is there any way to return $max_num_pages along with the results of this .get request?

    Thanks for any help and I’m so stoked to see WP API coming together!

    https://www.ads-software.com/plugins/json-rest-api/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter maniacaldesign

    (@gladneyc)

    Anyone have any ideas on this? I’m really not sure if it is something I’m doing wrong or if there are perhaps still glitches with the plugin affecting this. Really hoping to figure it out soon!

    Hi, did you get to solve this? I’m having the same problem. Thanks

    Hey guys, totally by chance I got this to work for me:

    /wp-json/posts?post_status=publish&page=4&posts_per_page=1&filter[posts_per_page]=1

    Hey this is how I finally made it work for me:

    wp-json/posts?filter[post_status]=publish&filter[posts_per_page]=20&page=2&filter[orderby]=date&filter[order]=desc

    Hope it helps!

    Thread Starter maniacaldesign

    (@gladneyc)

    Hey awesome! Thanks for the reply. I totally lost track of this thread. I walked away from this experiment because I couldn’t get past this but will definitely be picking it back up. Thanks again!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Pagination (paged) parameter doesn't seem to work’ is closed to new replies.