Linux 软件免费装
Banner图

Sticky Block for Gutenberg

开发者 wpwing
voboghure
更新时间 2026年6月21日 11:41

标签

gutenberg block editor sticky sticky block

下载

1.0.1 2.2.0 2.4.0 2.0.0 2.1.0 2.3.0

详情介绍:

Sticky Block for Gutenberg is a container block that sticks to the top or bottom of the page once the visitor scrolls past it. Drop any blocks inside — a navigation menu, a call-to-action, a contact button, a sidebar widget — and they will follow the reader down the page. Unlike CSS position: sticky (which only works within its parent scroll container), Sticky Block for Gutenberg uses position: fixed with intelligent scroll detection, so it works reliably in any layout. Key Features How to use
  1. In the block editor, search for Sticky Block and insert it anywhere on your page.
  2. Add blocks inside it — a Navigation block, a Button, a Group, anything you like.
  3. Open the block settings panel on the right and adjust offset, z-index, scroll behaviour, and sticky-state styles.
  4. Preview your page and scroll — the block will stick to the top (or bottom) of the viewport.

安装:

Automatic installation
  1. Go to Plugins → Add New in your WordPress admin.
  2. Search for Sticky Block for Gutenberg.
  3. Click Install Now, then Activate.
Manual installation
  1. Download the plugin ZIP from WordPress.org.
  2. Go to Plugins → Add New → Upload Plugin.
  3. Upload the ZIP and activate.

屏幕截图:

  • A sticky block with inner content shown in the editor.
  • The block settings sidebar — Sticky Options, Behavior, Responsive, Accessibility, and Sticky State Styles panels.
  • The block in action on the frontend in sticky (fixed) position.

常见问题:

Can I add more than one sticky block on a page?

Yes — you can place as many sticky blocks as you need on the same page. Each one has its own independent settings.

Does it work with the full-site editor (FSE)?

Yes. The block works in both the classic page/post editor and the full-site editor (Site Editor) in WordPress 5.9+.

Why does my sticky block not work inside a column or group?

If a parent element has overflow: hidden or overflow: clip set, position: fixed will be clipped to that container and may not behave as expected. Remove the overflow restriction on the parent, or move the sticky block outside the constrained container.

Can I disable sticky behaviour on phones or only show it on mobile?

Yes. Open the Responsive panel in the block settings. Enable "Disable sticky on mobile" to turn off sticky below a breakpoint (default: 768 px). Enable "Disable sticky on desktop" to turn it off above a breakpoint (default: 1024 px) — useful for elements that should only float on smaller screens.

How do I make the block stop before the footer?

Open the Behavior panel and enter a CSS selector in the "Stop before element" field — for example #footer or .site-footer. The block will un-stick before its bottom reaches that element.

Will it conflict with my theme's sticky header?

It should not conflict, but if both your theme and the plugin apply position: fixed to overlapping elements, adjust the Z-index setting in the block sidebar to control which element sits on top.

更新日志:

2.4.0 - 21/06/2026 2.3.0 - 14/06/2026 2.2.0 - 07/06/2026 2.1.0 2.0.0 1.0.1 1.0.0