| 开发者 | mrkohan |
|---|---|
| 更新时间 | 2026年11月23日 19:15 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/wp-admin, login, checkout, account, feeds, REST, and similar paths?softnav=0softnav:before — fired before navigation startssoftnav:after — fired after the swap; event.detail.root is the new content rootno-soft or attribute data-no-soft.
softnav folder to the /wp-content/plugins/ directory, or install the zip from Plugins → Add New.No. SoftNav does not create separate URLs or replace server HTML. Crawlers and users without JavaScript still receive a normal full page.
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.
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.
Add class no-soft or the data-no-soft attribute to that link.
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.
Listen for the softnav:after event on document and run your init code on event.detail.root.
softnav:before and softnav:after