WP API Post Categories not in term_order in Posts Endpoint
-
Hi,
I want to report about an issue I am facing using WP API.
I have lots of Categories and Child Categories Hierarchy.
At the Post Endpoint of the REST API, the Category and Child Category IDs are not always maintainedterm_order
or any order to be precise. By default, it should follow the parent-child order.
Some posts show it correctly but some of the posts are in the incorrect order.If my WordPress categories are in the following order:
Category 1 (ID 1) -Category 4 (ID 4) -Category 5 (ID 5) -Category 6 (ID 6) Category 2 (ID 2) -Category 7 (ID 7) -Category 8 (ID 8) --Category 9 (ID 9) --Category 10 (ID 10) Category 3 (ID 3) -Category 11 (ID 11) -Category 12 (ID 12)
I query
/posts?categories=10
where posts are also marked under Category 2, Category 8.
The result should be like –[2,8,10]
But instead, it shows like –[8,2,10]
or[2,10,8]
etcWhy I am facing this issue? Any one else face this issue?
The page I need help with: [log in to see the link]
- The topic ‘WP API Post Categories not in term_order in Posts Endpoint’ is closed to new replies.