=== Frontend View For Headless CMS ===
Contributors: Dropndot
Tags: headless frontend, next.js, headless CMS WordPress, React, WordPress to Next.js
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.2
Stable tag: 2.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Frontend View For Headless CMS links backend WordPress articles, pages, custom post types, taxonomies, and categories to the headless CMS site.

== Description ==

Frontend View For Headless CMS is a plugin that seamlessly links your backend WordPress content, including posts, pages, custom post types, taxonomies, categories, and authors to your headless CMS frontend site. This ensures that any content in your WordPress backend are linked with your headless CMS frontend, therefore, you can easily visit the contents using visit links.

**Features:**

* Set your headless frontend base URL in **Frontend View Settings**.
* Rewrite **View** links on post, page, CPT, taxonomy, and user list screens.
* Optional custom **preview path** (for example `/preview/post-slug/`) for draft and preview links.
* Map **author** archive paths to your frontend user segment.
* Per-taxonomy and per–post-type **slug overrides** to match your frontend routes.
* **Empty slug** option to remove taxonomy or CPT base segments from generated URLs (for flat routes like `/my-post/` instead of `/products/my-post/`).
* Frontend links in wp-admin open in a **new tab** for safer editing workflows.
* **Settings** shortcut on the Plugins screen for quick access to configuration.
* Redesigned settings page with slug mapping UI, quick guide, and helpful resources.

Works with any frontend that consumes WordPress via the REST API, GraphQL, or your own data layer—as long as your frontend URLs follow the paths you configure.

== Installation ==

1. From your WordPress dashboard, go to **Plugins → Add New**.
2. Search for `Frontend View For Headless CMS` and press Enter.
3. Click **Install Now**, then **Activate**.
4. Go to **Frontend View Settings** in the admin menu (or **Plugins → Settings** on this plugin’s row).
5. Enter your frontend site URL (no trailing slash) and save.

**Manual install:**

1. Upload the `frontend-view-for-headless-cms` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Open **Frontend View Settings** and enter your frontend site URL.

== Frequently Asked Questions ==

= 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** and enter your frontend site URL. Optionally enable a custom preview path, set the author slug, and map taxonomy or CPT path segments to match your frontend routing.

= 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**, where you can set a custom segment or enable **Empty slug** to drop the CPT base from links.

= 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.

= How do I set the frontend site URL? =

Go to **Frontend View Settings** and enter the full URL of your frontend (for example `https://www.example.com`).

= Does the plugin support HTTPS? =

Yes, both HTTP and HTTPS frontend URLs are supported.

== Screenshots ==

1. Plugin settings page with frontend URL and slug mapping.
2. View link on a post list row pointing to the headless frontend.
3. Opened frontend page for the respective content.

== Changelog ==

= 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.

== Upgrade Notice ==

= 2.0 =
Major update: redesigned settings, slug mapping, admin bar “Visit Site” support, preview paths, and improved link rewriting for headless frontends. Configure your frontend URL after upgrading.

== Development ==

This plugin is developed by Dropndot Solutions. For more information, visit [Dropndot Solutions](https://www.dropndot.com/).

== Contact ==

For support or inquiries, please contact us at [info@dropndot.com](mailto:info@dropndot.com).

== Like the Plugin? ==

If you find this plugin helpful, please leave a positive review on the [WordPress Plugin Directory](https://wordpress.org/plugins/frontend-view-for-headless-cms)
