跳到内容

SoftNav

v1.0.0

Reza Kohan · 2026年11月23日 上架

Soft page navigation without full reloads. Safer defaults for guests, checkout, and account pages.

正在使用
10 以下
评分
暂无
累计下载
60
最近更新
2026年11月23日
需要 WordPress 5.8+已测试到 7.1.5PHP 7.4+

贡献者

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.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums