Get SEO metadata
get_seo_metaReads SEO metadata for any content, normalizes across SEO plugins, and identifies mismatches with the rendered page to reveal caching or theme overrides.
Instructions
Read the SEO metadata for one piece of content (by id or URL), normalized across Yoast, Rank Math, AIOSEO, SEOPress and The SEO Framework: title, description, focus keyword, canonical, robots, Open Graph and schema types. Detects the active plugin, shows the per-item overrides it stores, and compares them with what the rendered page actually emits — a mismatch usually means page caching or a theme override. Works without an SEO plugin too (reports what WordPress core renders).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Content ID. Give either id or url. | |
| url | No | Front-end path or URL on the site, e.g. "/about/". Resolved to its content where possible; the site root is audited as the homepage. | |
| type | No | Content type of the id (post, page, a custom type). Omit to search post, page and then other types. | |
| plugin | No | Force which SEO plugin's fields to read, when detection misses it (e.g. REST namespaces hidden by a security plugin). | |
| 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. | |
| compare_rendered | No | Fetch the public page and compare its <head> with the stored values. Skipped automatically for unpublished content. |