Search engine optimisation in a headless WordPress setup requires a deliberate data pipeline: fields authored in the CMS must flow all the way toDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Ahondev/portfolio-v2/llms.txt
Use this file to discover all available pages before exploring further.
<meta> tags rendered in the React SPA. WP SSR Framework handles this end-to-end through SEOServiceProvider, which registers ACF field groups, attaches a scoring column to every SEO-enabled post-type list, provides a centralised SEO Dashboard in WP Admin, and — via WebController — injects the fields into the window.__wp_data__ payload consumed by the frontend.
ACF SEO Fields
SEOServiceProvider::registerSEOFields() creates a “Configuration SEO” field group (menu order 999, so it always appears at the bottom of the edit screen) and attaches it to every WordPress page and to any custom post type registered with has_seo: true.
| Field key | Label | Type | Width |
|---|---|---|---|
seo_title | Titre SEO | Text | 50% |
seo_description | Description SEO | Textarea (3 rows) | 50% |
seo_keywords | Mots-clés | Text | 50% |
seo_og_image | Image OpenGraph | Image (medium preview) | 50% |
seo_author | Auteur | Text | 50% |
seo_og_image uses ACF’s Image field type and stores the attachment ID, which the frontend resolves to a full URL at render time.
Enabling SEO on a Custom Post Type
Sethas_seo to true when registering your post type class. The provider reads PostType::all() at boot and automatically adds the location rule.
Per-Post SEO Score Column
Every SEO-enabled post-type list table in WP Admin gains a “SEO” column. The column evaluates six fields (seo_title, seo_description, seo_keywords, seo_canonical, seo_og_image, seo_author) and renders a compact score widget:
- Progress bar — proportional fill showing percentage of filled fields
- Colour-coded label — green (≥ 80 %), amber (≥ 40 %), or red (< 40 %)
- Missing field warnings — each absent field is listed below the bar with a ⚠ prefix
SEO Dashboard
The SEO Dashboard is accessible at WP Admin → SEO (menu position 3,dashicons-chart-area). It requires manage_options and provides a site-wide view of SEO health.
Global SEO score
A wide progress bar and percentage figure show the average score across all published pages and CPT posts. The bar uses the same green/amber/red colour scale as the per-post column.
Score by post type
A table breaks down the average SEO score per
post_type slug, so you can immediately see which content types need the most attention.Critical warnings
Counts of pages missing the four highest-impact fields are surfaced as a red warning list:
- pages without
seo_description - pages without
seo_title - pages without
seo_og_image - pages without
seo_canonical
Missing field counts table
A tabular breakdown of how many pages are missing each SEO field, letting you prioritise bulk-editing efforts.
How SEO Data Flows to React
WebController::view() reads the ACF post-meta fields for the currently matched page or post and builds a seo object that is embedded in the $__wp_data__ payload printed into the HTML response.
seo object is available on window.__wp_data__.seo and is also returned verbatim in JSON navigation responses (?json=1), allowing the React wp-router.tsx to update document.title and all relevant <meta> tags on every client-side navigation without a full page reload.
- Initial HTML load
On the first page load, the
seo object is embedded in the server-rendered HTML:The
seo_canonical field is tracked in the SEO score column but is not yet populated via ACF (it has no dedicated field in the current field group). The column uses get_post_meta directly, so you can set it programmatically or extend the field group to add a URL field.SEO Checklist
Static HTML for crawlers
Combine SEO fields with SSG so bots receive a fully-rendered page with correct
<meta> tags, not a blank React shell.Custom Post Types
Learn how to register post types with
has_seo: true to unlock the SEO field group and scoring column.