Get a theme preview URL
get_preview_urlGenerate a temporary private URL to preview a draft theme on any page, letting you verify changes before publishing without affecting site visitors. The link expires, so request a fresh one if 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. |