[WordPress] 外掛分享: SoftNav

首頁 › 外掛目錄 › SoftNav
全新外掛
安裝啟用
—
尚無評分
7 天前
最後更新
—
問題解決
WordPress 5.8+ PHP 7.4+ v1.0.0 上架:2026-11-22

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「SoftNav」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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.

延伸相關外掛

文章
Filter
Mastodon