Jeje
Jeje

Reputation: 43

wordpress rest api taxonomy return only 10

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

Upvotes: 2

Views: 1917

Answers (1)

nodws
nodws

Reputation: 1127

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

Upvotes: 6

Related Questions