want to display all parent category with first level child in rest api
-
Hey guys,
I want to display all parent category with first level child in rest api. If I click on https://demo.wp-api.org/wp-json/wp/v2/categories
It should diplay like this:[ { "id": 3, "name": "Cricket", "slug": "cricket", "parent": 0 { "id": 10, "name": "Doubles", "slug": "doubles", "parent": 3 }, { "id": 2, "name": "Football", "slug": "football", "parent": 0 }, ]
Can anyone please help me… i want the exact code…
thanks
- The topic ‘want to display all parent category with first level child in rest api’ is closed to new replies.