Reset a customised template
reset_template_customizationRevert a Site Editor template customization to the theme's file version by deleting the database copy. Preview the change with a dry run, then confirm with a token to apply.
Instructions
Revert a template or template part that was edited in the Site Editor back to the theme's file, by deleting the database copy (DELETE /wp/v2/templates/{id}?force=true). Only works on items whose source is "custom" — find them with diff_global_styles. Without confirm_token it is a dry run that shows what would be lost; if the item was created in the Site Editor and has no theme file, deleting removes it entirely, and the preview says so.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Template id as "theme//slug", e.g. "twentytwentyfive//single". | |
| kind | No | Whether the id names a template or a template part. | template |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. | |
| confirm_token | No | Token from this tool's dry-run preview. Omit to preview. |