StickySpot – Sticky Sidebar, Widgets & Blocks

By serbyy

0+ active installationsVersion 1.0.0

Keep any widget, block or element visible while visitors scroll. Stops before the footer and works with classic and block themes.

Description

StickySpot keeps your most important content in view: newsletter boxes, ads, tables of contents, buy buttons, author boxes or a whole sidebar. Visitors scroll, the element stays on screen, and it slides away politely before it reaches your footer.

Make anything sticky

  • Widgets: every widget gets a “Make this widget sticky” checkbox.
  • Blocks: every block gets a Sticky panel in the block editor, in posts, pages, the widget editor and the Site Editor.
  • Any element: add a CSS selector and StickySpot does the rest. Each rule can have its own margins, stop element and screen size.
  • Auto sticky: make the last widget of any sidebar sticky with one click.
  • Stop blocks and widgets: mark any block or widget as a stop element and sticky items slide up when they reach it.
  • Page builders and classic editor: wrap content in [stickyspot]...[/stickyspot], or give any element the class stickyspot-sticky.

Smart by default

  • Stops before the footer automatically, so it never covers it.
  • Stays below fixed or sticky site headers: switch on automatic detection or enter the header’s selector.
  • Stays below the WordPress admin bar.
  • Several sticky items in one column can stack or push each other away.
  • Elements taller than the screen scroll first and then stick at the bottom, so nothing gets cut off.
  • Follows late loading images, ads and comments.

Two engines

StickySpot uses fast native CSS sticky positioning whenever your theme allows it, and switches to its JavaScript engine when the theme blocks it (for example with hidden overflow on columns). You can also force either engine.

Full control

  • Top and bottom margins, stop elements, stay inside the parent column.
  • Responsive rules: minimum and maximum screen width, minimum screen height, turn off on touch devices.
  • Display rules: turn off on the home page, archives, search, 404, single post types, specific posts or for logged-in users. No script is loaded where StickySpot is off.
  • Appearance while stuck: shadow, background colour, corner radius, fade in, z-index and an extra CSS class.
  • Import, export and reset of all settings.
  • Debug mode with outlines and console messages.

Switching from Fixed Widget

StickySpot reads the “Fixed widget” checkbox of the old Fixed Widget plugin, so those widgets stay sticky right away. Its sticky blocks and stop blocks keep working too. On first activation StickySpot copies Fixed Widget’s margins, stop elements, screen limits and custom selectors; you can repeat this any time under Import & Export.

Light and accessible

  • Plain JavaScript, no jQuery and no other libraries on the front end.
  • Scripts load only where they are needed: on pages with sticky widgets or blocks, or on every page once you add element rules.
  • Respects “reduced motion” settings.
  • Translation ready.

For developers

  • CSS classes stickyspot-is-pinned and stickyspot-is-pushed.
  • JavaScript events stickyspot:pin and stickyspot:unpin, and window.StickySpot.refresh().
  • PHP filters stickyspot_enabled and stickyspot_config.

Installation

  1. Install StickySpot from Plugins > Add New, or upload the stickyspot folder to /wp-content/plugins/.
  2. Activate the plugin.
  3. Tick “Make this widget sticky” on a widget, switch on “Make this block sticky” on a block, or add a CSS selector under Appearance > StickySpot > Sticky Elements.

FAQ

My widget does not stick.

Go to Appearance > StickySpot and set the Sticky engine to JavaScript. Some themes hide overflow on their columns, which blocks native CSS sticky. Debug mode shows what StickySpot decided in the browser console.

The sticky element covers my footer.

Keep “Stop before the footer automatically” switched on, or enter the selector of your footer (for example #colophon) under Stop elements.

It slides under my fixed menu.

Switch on “Detect sticky headers automatically”, or enter the selector of the menu under Header selectors.

Can I turn it off on phones?

Yes. Set “Only on screens wider than” to 1024 on the Responsive tab, or switch on “Disable on touch devices”.

Does it work with Elementor, Divi or other page builders?

Yes. Use the [stickyspot]...[/stickyspot] shortcode, or add the element’s selector under Sticky Elements. You can also give the element the CSS class stickyspot-sticky and switch on “Load on every page” on the Advanced tab.

Does it work with block themes?

Yes. Use the Sticky panel on any block, including blocks in templates and template parts in the Site Editor.

Does it slow down my site?

No. The front-end script is small, has no dependencies and only loads on pages that contain sticky content.

Screenshots

Changelog

1.0.0

  • First release.