WP Manifestindependent plugin directory
manifest / performance / custom-spa

custom spa

Lightweight plugin that turns WordPress front-end navigation into a single-page-app experience, without a JS framework.

by elmira-ashrafi · github.com/elmira-ashrafi/custom-spa

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/elmira-ashrafi/custom-spa/archive/refs/heads/main.zip

Readme

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) at template_redirect and 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-content region, and any `

Read the full README on GitHub →