[WordPress] 外掛分享: Stayrail – Sticky Widgets & Elements

首頁 › 外掛目錄 › Stayrail – Sticky Widgets & Elements
WordPress 外掛 Stayrail – Sticky Widgets & Elements 的封面圖片
全新外掛
安裝啟用
—
尚無評分
2 天前
最後更新
—
問題解決
WordPress 6.2+ PHP 7.4+ v0.5.0 上架:2026-10-26

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.5.0) 或搜尋安裝

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

原文外掛簡介

Stayrail keeps your most important content in view: sidebar ads, sign-up forms, tables of contents, calls to action or anything else you choose.
It is a modern, actively maintained alternative to the “Fixed Widget” (Q2W3) plugin, and it can import your existing Fixed Widget setup in one click.
Three ways to make something sticky

Blocks – select any block in the editor, site editor or block widget editor and switch on “Keep sticky while scrolling”.
Classic widgets – tick “Keep sticky while scrolling” on any widget under Appearance → Widgets.
Anything else – add a CSS selector in the settings, or give an element the class stayrail-sticky. Works with page builders such as Elementor, Divi, Bricks and Brizy.

Built to just work

Stable width when zooming, resizing or rotating the screen.
Zero layout shift: a placeholder keeps the element’s spot in the page.
Automatically stays below the admin bar and sticky headers.
Automatically stops at the site footer, plus your own stop elements.
Several sticky widgets in one sidebar stack neatly.
Choose desktop, tablet and/or mobile, with your own breakpoints.
Elements taller than the screen scroll until their bottom is reached, then stick.
Plain JavaScript, no jQuery. Script loads deferred.
Translation-ready. Norwegian (bokmål) included.

Switching from Fixed Widget
Activate Stayrail and you’ll see an import notice. One click copies your margins, stop elements, custom elements, minimum screen size and every widget you had marked as fixed. Then deactivate Fixed Widget.
For developers

window.Stayrail.refresh() – re-scan the page after loading content with JavaScript (infinite scroll, AJAX).
document.dispatchEvent( new Event( 'stayrail:refresh' ) ) – same, event-based.
data-stayrail-devices="desktop,tablet" – per-element device override.
data-stayrail-after="30" – only stick after 30 % of the page has been scrolled.
.stayrail-is-stuck – class added while an element is pinned.
stayrail:stuck / stayrail:released – events fired on the element when it is pinned or released.
stayrail_frontend_config – filter the configuration sent to the script.

External services
Stayrail includes the Freemius SDK, which is used only to sell and license the optional Stayrail Pro add-on. It runs in anonymous mode: the free plugin shows no opt-in screen and sends no data on its own.
Data is sent to Freemius (https://freemius.com) only if you choose to opt in from the Plugins screen, or when you buy or activate Stayrail Pro. In that case Freemius receives your site address, WordPress and plugin versions, and the admin e-mail and name used for the license. Freemius terms: https://freemius.com/terms/ – privacy policy: https://freemius.com/privacy/

延伸相關外掛

文章
Filter
Mastodon