0

When I try to list terms from taxonomy with wp rest api i get only 10 items. eg. my-domain.io/wp-json/wp/v2/my_taxonomy/?

In php, with get_terms('my_taxonomy'), i get all terms from this taxonomy.

It seems that WP limits the result from the rest api.

Any help ?

Thanks

1
  • Can you try updating the WP settings aboute post per page ? You could also try "post_per_page" or "showposts" with "-1" parameter in your get_terms arguments. See get_terms codex page.
    – Mtxz
    Aug 31, 2018 at 14:17

1 Answer 1

3

As you can see in the documentation you need to indicate the number of items to show (default is 10)

/wp-json/wp/v2/my_taxonomy/?per_page=99

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.