The services pages grew one at a time, so they all sit at the top level, and the URLs show it: /web-design/, /hosting/, /maintenance/ instead of living under /services/. Fixing it means opening each page, finding Page Attributes, choosing the parent and the template, and saving. With ten pages that is a slow afternoon.
This prompt does the same thing in one approved pass.
I want these pages moved under our [Services] page: [Web design, Hosting,Maintenance]. Each should use the [Full width] page template.
List the pages with get-pages and find the parent and the three child pages.Tell me each page's id and current link, so we can see where it sits now. Ifthe Services page does not exist, ask me before creating it, as a draft.
Find the template's exact value: on a block theme, list the templates withlist-templates and give me its slug; on a classic theme, ask me for the filename. update-page refuses a slug the theme does not offer for pages, so ifit is refused, ask me for the right one. Show me a table of each page, its current link and what will change, andwait for my go.
Then update one page per call with update-page, sending only parent_id andtemplate. If a page is refused because a page builder owns it, skip it andtell me. Read each page back with get-page and confirm its new link.Why this is safe to run
The plan comes from reads. A page’s link shows where it sits in the hierarchy, so you see the before and after of every move in the table you approve. The update sends only the two fields that change, and the rest of the page stays as it is.
Both fields are checked before anything saves. A missing or trashed parent, a loop, or a template the theme does not offer is refused with nothing changed. Pages a page builder owns are refused for everything except an excerpt, since a write there could break the builder’s stored layout; the agent reports them instead of forcing the change.
Update page is off until you switch it on, is checked against the edit access of the user you bound the agent to, and each call lands in the Activity Log. Because it is covered by the Changes tab, each move can be reverted there while the page has not been edited since.
Moving a page under a parent changes its URL. Check the links and menu items that point at the old addresses afterwards, and add redirects where people or search engines still use them.
Already connected? Ask your agent for the “nest pages under a parent” recipe, name the parent, the pages and the template, and it runs the same flow on your own site.