Linux 软件免费装

SoftNav

开发者 mrkohan
更新时间 2026年11月23日 19:15
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

performance ajax navigation spa page-transitions

下载

1.0.0

详情介绍:

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 Settings Go to Settings → SoftNav to: For theme developers After SoftNav swaps content, listen for: 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.

安装:

  1. Upload the softnav folder to the /wp-content/plugins/ directory, or install the zip from Plugins → Add New.
  2. Activate SoftNav through the Plugins screen.
  3. Open Settings → SoftNav and review the content selector and excluded paths for your theme.

升级注意事项:

1.0.0 First release. After install, open Settings → SoftNav and confirm the content selector matches your theme.

常见问题:

Does SoftNav hurt SEO?

No. SoftNav does not create separate URLs or replace server HTML. Crawlers and users without JavaScript still receive a normal full page.

Is it safe for WooCommerce or membership sites?

By default SoftNav runs only for guests. Checkout, cart, account, and admin routes always use a full page load. You can add more path fragments under Excluded paths.

Will it work with my theme?

Yes, if your theme has a clear main content wrapper such as main, #main, #content, or .site-main. SoftNav tries those selectors by default; you can change the selector in settings.

How do I exclude one link?

Add class no-soft or the data-no-soft attribute to that link.

How do I exclude custom checkout or account URLs?

Add one URL fragment per line under Settings → SoftNav → Excluded paths. Core security paths are always enforced even if you remove them from the list.

How can themes re-init scripts after a soft navigation?

Listen for the softnav:after event on document and run your init code on event.detail.root.

更新日志:

1.0.0