
This is a custom frontend view for a headless CMS plugin.
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:3000 are 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
Screenshots

General settings — connect WordPress to your headless frontend and toggle redirects, custom preview path, and secure authenticated preview.

Slug Mapping — set the author slug and per-taxonomy / per-CPT path overrides, with nested paths and an "Empty slug" option.

Mapping Conflicts — advisory, non-blocking warnings that flag ambiguous or ineffective slug mappings with suggested fixes.

Connection Diagnostics — an SSRF-protected reachability test reporting status, response time, TLS verification, and redirects.

Secure Preview — rotate the signing secret (with a grace window) and revoke all active preview sessions.

Import / Export (Tools) — move your configuration between sites with a reviewed, confirmation-gated import and secret-free export.

Next.js Preview — built-in integration documentation with copy-ready App Router route handlers.
FAQ
Can I use this plugin with any front-end application?
Yes. It only rewrites admin links to URLs you configure. Your frontend can be built with Next.js, Nuxt, Gatsby, Astro, React, Vue, or any other stack.
How do I configure the plugin?
After activation, open Frontend View Settings. On the General tab, enter your frontend site URL. Optionally enable frontend redirects, a custom preview path, and secure authenticated preview. On the Slug Mapping tab, set the author slug and map taxonomy or CPT path segments to match your frontend routing.
Can WordPress frontend page requests redirect to my headless site?
Yes. Enable Redirect frontend requests to headless frontend on the General tab. Public page requests are redirected with a 301 to the matching URL on your frontend. Admin, REST API, GraphQL, feeds, sitemaps, previews, login, and similar backend endpoints are never redirected. The option is off by default.
Does this plugin work with custom post types?
Yes. Public custom post types shown in the admin UI appear under Post type / CPT slug overrides on the Slug Mapping tab, where you can set a custom segment or enable Empty slug to drop the CPT base from links.
Can I map content to a nested frontend path?
Yes. Slug fields accept nested paths such as news/technology or blog/category/updates. Each path segment is sanitized individually, so the / separators are preserved while the value stays slug-safe. Existing single-level mappings continue to work unchanged.
Can I use a local development frontend URL?
Yes. Local URLs such as http://localhost:3000 or http://127.0.0.1:3000 are accepted for link rewriting and redirects. The plugin only builds links and browser redirects to the URL; it does not make server-side requests to it.
What happens to my settings when I delete the plugin?
By default, your settings are preserved when the plugin is deleted, so removing and reinstalling keeps your configuration. If you want deletion to also remove the saved settings, enable Delete all plugin settings when the plugin is deleted on the General tab before deleting.
How does secure authenticated preview work?
Enable secure authenticated preview on the General tab. When an authorized editor previews unpublished content, the plugin verifies their capability in wp-admin and issues a short-lived (120-second), single-use, HMAC-signed token in the preview URL. Your Next.js frontend’s /api/preview route exchanges that token (server-to-server) for an opaque preview session stored in an httpOnly cookie, then fetches the draft from a token-gated WordPress endpoint. Sessions use a 20-minute sliding and 30-minute absolute expiry and can be revoked. Previewable statuses are draft, pending, private, and scheduled; published content is served normally. No permanent secret ever appears in a URL, the signing secret can be rotated, and the public REST API is not changed. The feature is off by default and requires the matching Next.js integration (documented in full on the Next.js Preview tab).
How do I test the connection to my frontend?
On the Diagnostics tab, click Run Diagnostics. It makes a single request to your saved frontend URL and reports whether it is reachable, the HTTP status, the response time, and whether TLS/SSL verified. For security it only tests the configured URL (never an arbitrary one), verifies the certificate, blocks requests to private, loopback, link-local, reserved, or cloud-metadata addresses (IPv4 and IPv6), and validates each redirect hop. Local and private-network frontend URLs (for example http://localhost:3000) are skipped with a note rather than probed, and runs are rate-limited.
Can I move my settings to another site?
Yes. On the Tools tab, use Export Settings to download your configuration as a versioned JSON file, then use Preview Import on the other site to upload it. You will see a preview of exactly what would change and must click Confirm Import before anything is applied. If the file is invalid, from a newer plugin version, or contains no recognized settings, the import is rejected and your existing settings are preserved. Secret values are never included in an export and can never be set through an import.
What are the “Mapping Conflicts” warnings on the settings page?
When you configure slug mappings, the plugin analyzes them and shows advisory warnings for configurations that may not behave the way you expect. These warnings never change your settings and never block saving. Detected issues include:
- Duplicate source segment (High): two content types map from the same first path segment, so only one destination takes effect.
- Empty slug vs. slug override (High): a source has both “Empty slug” enabled and a slug override; the base segment is stripped first, so the override is ignored.
- Shadowed nested mapping (High): a nested source such as
news/technology is overridden by the mapping on its first segment (news), so its intended destination is never produced. Consistent nested mappings (for example news → articles together with news/technology → articles/technology) are not flagged.
- Unreachable nested source (Low): a nested source whose first segment has no mapping can never match, because the engine rewrites only the first path segment.
- Duplicate destination path (Medium): several sources point at the same frontend path, which is ambiguous when mapping back to WordPress.
- Reserved WordPress route (Medium): a mapping uses a reserved segment such as
wp-admin, wp-json, feed, or sitemap.
- Invalid destination / Normalization notice (Medium/Low): a destination is empty after sanitization, or is stored in a non-normalized form (leading, trailing, or doubled slashes).
Each warning explains the issue and suggests a fix. Review and resolve them at your discretion.
What does “Empty slug” do?
When enabled for a taxonomy or post type, the plugin removes that base path segment from generated URLs. For example, /products/my-item/ can become /my-item/ on your frontend if your routes are flat.
Is this plugin compatible with multisite?
Yes, the plugin is compatible with multisite installations. Configure the frontend URL per site as needed.
Does the plugin support HTTPS?
Yes, both HTTP and HTTPS frontend URLs are supported.
ChangeLog
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, version 1) 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 → articles with news/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 weakening wp_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/technology are 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