manifest / performance / custom-spa
custom spa
Lightweight plugin that turns WordPress front-end navigation into a single-page-app experience, without a JS framework.
★ 0stars
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/elmira-ashrafi/custom-spa/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Custom SPA for WordPress
A lightweight WordPress plugin that turns normal front-end navigation into an SPA-style (single-page-application) experience — without a JS framework, a build step, or touching your theme's templates. Regular WordPress page requests still render exactly as they always have; only AJAX/fragment requests get intercepted and converted into structured JSON, so a front-end script can swap in new content without a full page reload.
✨ Key Features
- Transparent fragment interception — detects AJAX requests (
X-Requested-With: XMLHttpRequest) attemplate_redirectand captures the page's rendered HTML output before it's sent to the browser. - Structured JSON responses — instead of returning full HTML on a fragment request, the plugin extracts and returns just what's needed to update the page: the document title, the
#spa-contentregion, and any `