capabilities.work

Create Subpage Under Parent

A 3-step recipe with WordPress. We can help you get access.

Recipe · 3 steps

Create Subpage Under Parent

Create a child page nested under an existing parent page.

  1. Search the pages collection for a page whose content matches the supplied parent title, returning at most one match.
  2. Create a new page nested under the matched parent by setting its parent to the matched page id.
  3. Read the child page back by id to confirm it was created.
What you'll need to have ready
  • authorization: HTTP Basic Authorization header value built from a WordPress Application Password (e.g. "Basic dXNlcjpwYXNzd29yZA==").
  • parentTitle: The title used to locate the parent page.
  • childTitle: The title for the new child page.
  • childContent: The HTML content body for the new child page.
For your developer

Arazzo workflow wordpress:create-subpage-under-parent, 3 operations: listPages → createPage → getPage. Specs on APIs.io.