Frontend View For Headless CMS
Point WordPress "View" links at your headless frontend, redirect visitors, map slugs to your routes, and securely preview drafts on Next.js.
Install in
Frontend View For Headless CMS connects your WordPress backend to the decoupled frontend that actually renders it. When WordPress is your content source and the public site is built with Next.js, Nuxt, Astro, Gatsby, React, Vue, or any other stack, the admin “View” links, preview links, and author/taxonomy URLs normally still point at WordPress. This plugin rewrites them to the paths your frontend uses, so editors land on the real, published experience every time.
Everything is configured from a single, redesigned Frontend View Settings page with a clean tabbed layout: General, Slug Mapping, Diagnostics, Secure Preview, Tools, and a built-in Next.js integration guide. No code is required for the core workflow — set your frontend URL and your links just work.
What it does
- Rewrites admin “View” links on post, page, custom post type, taxonomy, and user list screens to your configured frontend URL. Links open in a new tab for a safer editing workflow.
- Optional 301 redirect of public WordPress frontend requests to your headless frontend, while leaving admin, REST API, GraphQL, feeds, sitemaps, robots.txt, previews, login, cron, and AJAX untouched. Off by default.
- Custom preview path (for example
/preview/post-slug/or/api/preview) for draft and preview links, with the preview query string preserved. - Author slug mapping so author archive links match your frontend user segment.
- Per-taxonomy and per–post-type slug overrides to align WordPress routes with your frontend routing.
- Nested path support in every slug field (for example
news/technology), so hierarchical frontend routes are preserved. Existing single-level mappings keep working unchanged. - Empty slug option to drop a taxonomy or CPT base segment entirely (flat routes like
/my-post/instead of/products/my-post/). - URL conflict detection that surfaces advisory warnings for duplicate, shadowed, reserved, or ambiguous slug mappings right on the settings page. Warnings never block saving and never change your settings.
- Settings import/export in a versioned JSON format, with an import preview and an explicit confirmation step. Secrets are never exported, and a failed import leaves your existing settings untouched.
- Connection diagnostics that test connectivity to your configured frontend (status, response time, TLS verification, redirects) with strong SSRF protection. Only the saved URL is tested, private/reserved addresses are blocked, every redirect hop is re-validated, and local/development URLs are skipped for safety.
- Secure authenticated preview (opt-in) so authorized editors can preview draft, pending, private, and scheduled content on a Next.js (App Router, Draft Mode) frontend using a short-lived, single-use signed token that is exchanged for an httpOnly preview session. No permanent secret is ever placed in a URL.
- Local development URLs such as
http://localhost:3000are supported for link rewriting and redirects. - Multisite compatible, with a per-site frontend URL.
Works with any frontend that consumes WordPress through the REST API, GraphQL, or your own data layer — as long as your frontend URLs follow the paths you configure.
Development
This plugin is developed by Dropndot Solutions. For more information, visit Dropndot Solutions.
Contact
For support or inquiries, please contact us at info@dropndot.com.
Like the Plugin?
If you find this plugin helpful, please leave a positive review on the WordPress Plugin Directory
Written by Joobi from the project's own listing. See the source page
3.0.0
- Add Secure Authenticated Preview (opt-in, off by default): authorized editors can preview draft, pending, private, and scheduled content on a headless Next.js frontend.
- Two-token model: a short-lived (120s), single-use, HMAC-SHA256 signed exchange token (capability verified at issuance in wp-admin and bound into the signature) is traded by the Next.js server for an opaque, server-tracked preview session (httpOnly cookie, 20-minute sliding / 30-minute absolute expiry).
- Atomic single-use enforcement via a UNIQUE wp_options insert; byte-exact compare-and-swap for sessions and the signing secret; no custom database table.
- Signing secret stored server-side (never exported), auto-generated, and rotatable with a grace window; admin controls to rotate the secret and revoke all sessions.
- New token-gated REST endpoints under
fvhc/v1/preview/*; the public REST API and existing permissions are unchanged. - Gutenberg “Preview in new tab” is supported via the authenticated autosave response; classic preview links are supported via the preview-link filter.
- New redesigned settings page with a tabbed layout (General, Slug Mapping, Diagnostics, Secure Preview, Tools, Next.js Preview) and a built-in Next.js integration guide.
- No changes to admin link rewriting, slug mapping, conflict detection, import/export, diagnostics, redirects, or public REST output.
2.5.0
- Add Connection Diagnostics: test connectivity between WordPress and the configured frontend URL (reachability, HTTP status, response time, TLS/SSL verification, redirects followed).
- Strong SSRF protection: only the admin-configured URL is ever requested; every resolved IP (IPv4, IPv6, and IPv4-mapped IPv6) is checked against private, loopback, link-local, reserved, CGNAT, and cloud-metadata ranges; TLS verification is always on; redirects are not auto-followed — each hop is re-resolved and re-validated.
- Local/private frontend URLs skip the live request with a clear explanation; SSRF protection is never weakened for local development.
- Secure admin-post handler (POST-only,
manage_options, nonce) with per-user rate limiting. Results never expose resolved IPs, headers, response bodies, server paths, or raw transport errors. - No changes to admin link rewriting, slug mapping behavior, previews, redirects, conflict detection, import/export, or public REST output.
2.4.0
- Add Settings Import/Export. Export your configuration as a versioned JSON file (format
fvhc-settings, version1) and import it on another site. - Imports are previewed (current vs. proposed values) and require explicit confirmation before any change is applied.
- Imports are validated before anything is written: file size, JSON structure/depth, format identifier, version, and a strict option whitelist are all checked, and every value is sanitized with the same rules as the settings form. A failed import leaves existing settings unchanged.
- Secrets are never exported and can never be set through an import; unrecognized or arbitrary option names are ignored.
- Centralize the managed option list in
fvhc_get_managed_option_names(), now reused by export, import, and uninstall cleanup. - No changes to admin link rewriting, slug mapping behavior, previews, redirects, or public REST output.
2.3.0
- Add URL conflict detection for slug mappings. The settings page now shows advisory warnings for configurations that may be ambiguous or ineffective: duplicate source segments, duplicate destination paths, “Empty slug” combined with a slug override, nested mappings shadowed by their first-segment mapping, unreachable nested sources, reserved WordPress route segments, and invalid or non-normalized destinations.
- Warnings are advisory only. The plugin never changes, removes, or rewrites your saved mappings, and saving is never blocked.
- Nested mappings that are genuinely consistent (for example
news → articleswithnews/technology → articles/technology) are recognized as valid and are not flagged, matching the engine’s first-path-segment rewriting behavior. - No changes to admin link rewriting, slug mapping behavior, previews, redirects, or public REST output.
2.2.1
- Redirect safety fixes for the optional frontend redirect:
- Prevent redirect loops: requests that already arrive on the configured frontend host (for example when the frontend host also resolves to this WordPress, or a frontend proxies unknown paths back) are no longer redirected. Host comparisons are case-insensitive and ignore ports.
- Respect WordPress canonicalization: the redirect now runs after WordPress core (priority 11), so trailing-slash normalization, ugly permalinks (such as
?p=123), and old-slug redirects resolve first, avoiding non-canonical redirect chains. - Do not redirect WordPress 404 responses to the frontend.
- Local development frontends (for example
http://localhost:3000) now work for the 301 redirect, consistent with link rewriting, without weakeningwp_safe_redirect()host validation. - No changes to admin link rewriting, slug mapping, previews, or public REST output.
2.2.0
- Add nested path support to slug mappings (taxonomy, post type/CPT, author, and preview path), so hierarchical routes like
news/technologyare preserved instead of being flattened. Existing single-level mappings are unchanged. - Support local development frontend URLs (for example
http://localhost:3000) for link rewriting and redirects. - Preserve the preview query string (preview, preview_id, preview_nonce, etc.) when a custom preview path is used.
- Rewrite the block editor permalink / “View” link via the authenticated edit-context REST response only; public (view-context) REST output is not modified.
- Add an opt-in Delete all plugin settings when the plugin is deleted option (off by default) with a dedicated uninstall handler; multisite-aware.
- Complete internationalization of the settings screen strings.
2.1.1
- Fix Plugin Check OffloadedContent errors by bundling sidebar plugin icons locally instead of loading them from WordPress.org.
2.1
- Raise minimum WordPress version to 6.5.
- Add optional Redirect frontend requests to headless frontend setting (off by default).
- When enabled, public frontend page requests are redirected (301) to the configured headless frontend URL, preserving path, query string, and trailing slash.
- Redirects reuse existing frontend URL rewriting (slug overrides, empty slug, author slug).
- Admin, REST API, GraphQL, feeds, sitemaps, robots.txt, previews, login, cron, AJAX, and similar backend endpoints are excluded from redirects.
2.0
- Fixed redirection issue.
- Major release with redesigned Frontend View Settings page.
- Rewrite admin View links for posts, pages, custom post types, taxonomies, and users to the configured frontend URL.
- Add optional custom preview path segment for preview and draft links.
- Add author slug mapping for author archive URLs.
- Add per-taxonomy and per–post-type slug overrides for frontend route alignment.
- Add Empty slug option to strip taxonomy or CPT base segments from URLs.
1.1
/preview/slug will be used for preview posts, pages etc.
1.0
- Initial release.
Follow this listing's changes (Atom feed)