Get a theme preview URL
get_preview_urlGenerate a private preview URL for a draft theme on a WordPress site, letting you check changes before publishing without affecting other visitors. The token expires, so fetch a fresh one when needed.
Instructions
Get a tokenised private URL that renders the site using a draft theme, without affecting what anyone else sees. Share it or open it to check your work before publishing. The token expires, so fetch a fresh URL if it stops working.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Which page to preview, e.g. "/about/". | / |
| theme | No | Draft theme id to preview. Defaults to the most recent draft. | |
| 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. |