Get Page HTML
wp_get_page_htmlRetrieve the rendered HTML of any page on the connected WordPress site. Use this to verify changes you made actually rendered correctly — check headlines, content, meta tags, links, or layout after creating/updating posts, pages, or theme files. Returns cleaned HTML (scripts and styles stripped to save tokens). Supports public pages, drafts (via preview), and custom URLs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Page URL on the connected site (e.g. "https://example.com/about"). Must belong to the connected site — external URLs are rejected. If omitted, fetches the homepage. | |
| post_id | No | Post/page ID to fetch. Automatically resolves the permalink. Works for drafts too. | |
| site_id | No | Site ID to target (optional if you have only one connected site) | |
| selector | No | CSS selector to extract a specific section (e.g. "article", ".entry-content", "#main"). Returns only the matched element's HTML. Omit to get the full page body. | |
| include_meta | No | If true, also returns <head> meta tags (title, description, og:tags, canonical). Useful for SEO verification. Default: false. |