外掛標籤
開發者團隊
原文外掛簡介
SoftNav makes browsing feel faster by loading the next page in the background and swapping only the main content. Your header and footer stay in place, and a short transition plays while the new content appears.
It is built as a progressive enhancement: every URL still returns normal server-rendered HTML for search engines and visitors without JavaScript.
Features
Soft navigation for guest visitors
Staff and editors never receive SoftNav (full page loads only)
Sensitive routes always full-load: /wp-admin, login, checkout, account, feeds, REST, and similar paths
Scripts and unsafe handlers are stripped from fetched HTML before insert
Optional prefetch on hover or touch
Theme-friendly events after each soft navigation
Disable SoftNav for one visit with ?softnav=0
Settings
Go to Settings → SoftNav to:
Enable or disable SoftNav
Choose the content CSS selector to swap
Add extra URL fragments to skip
Toggle prefetch
Optionally enable SoftNav for regular logged-in users (admins/editors stay excluded)
For theme developers
After SoftNav swaps content, listen for:
softnav:before — fired before navigation starts
softnav:after — fired after the swap; event.detail.root is the new content root
Re-initialize sliders, forms, or other front-end widgets inside that handler.
To skip SoftNav on a single link, add class no-soft or attribute data-no-soft.
