wp_set_seo_meta
Set a page's SEO META DESCRIPTION, SEO title, ROBOTS directive and/or CANONICAL URL — the go-to tool for 'fix my missing meta description' and for keeping a draft/duplicate out of the index (robots='noindex,nofollow'). Omit post_id to target the homepage. Writes the active SEO plugin's fields (Yoast/RankMath/AIOSEO); if the site has NO SEO plugin the XeoRank Connector renders the tags itself, so this works on any WordPress site. The response echoes applied_values READ BACK from the provider — trust that, not the input. Requires Connector >= 0.7.5; robots/canonical_url need >= 0.9.17 (on error='connector_update_required', tell the user to update the plugin). Keep descriptions 70–165 characters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| robots | No | Robots directive: 'noindex,nofollow', 'noindex', 'index,follow', … Unknown tokens are refused, never ignored. | |
| post_id | No | Page/post ID. Omit for the homepage (static front page). | |
| site_id | Yes | The WordPress site ID | |
| seo_title | No | Optional SEO title override | |
| canonical_url | No | Absolute http(s) canonical URL for the page (e.g. point a duplicate at its original) | |
| meta_description | No | The meta description text (70–165 chars recommended) |