Get children of parent page
-
How can I get the children of a parent post (page)?
For example in a default install I have a page (ID 2) and created a new page as a child of this (ID 3). I want to pass ID 2 and get the parent and all children back.
How can I do this?
Obviously I can get the parent itself with:
https://127.0.0.1/wordpress/wp-json/posts/2(I am actually looking to do this with bbPress CPT topics which are parents of CPT replies – but I figure if I can’t get it working with standard pages I’ll never get it working with bbPress).
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Get children of parent page’ is closed to new replies.