WordPress.org

Plugin Directory

Test out the new Plugin Directory and let us know what you think.

Sticky Menu (or Anything!) on Scroll

Sticky Menu (Or Anything!) On Scroll will let you choose any element on your page that will be "sticky" at the top once you scroll down.

Summary

The Sticky Menu (Or Anything) On Scroll plugin for WordPress allows you to make any element on your pages "sticky" as soon as it hits the top of the page when you scroll down. Although this is commonly used to keep menus at the top of your page, the plugin allows you to make ANY element sticky (such as a Call To Action box, a logo, etc.)

A little bit of basic HTML/CSS knowledge is required. You just need to know how to pick the right selector for the element you want to make sticky, and you need to be sure it's a unique selector. Sometimes a simple selector like "nav", "#main-menu", ".menu-main-menu-1" is enough. Other times you will have to be more detailed and use a more specific selector such as "header > ul:first-child" or "nav.top .menu-header ul.main".

Features

  • Any element can stick: although common use is for navigation menus, the plugin will let you pick any unique element with a name, class or ID to stick at the top of the page once you scroll past it. Use it for a sidebar, Call-to-action box, banner ad, etc.
  • Positioning from top: optionally, you can add any amount of space between the sticky element and the top of the page, so that the element is not always stuck at the "ceiling" of the page.
  • Enable for certain screen sizes only: optionally, you can set a minimum and/or maximum screen size where the stickiness should work. This can be handy if you have a responsive site and you don't want your element to be sticky on smaller screens, for example.
  • Push-up element: optionally, you can pick any other element lower on the page that will push the sticky element up again (for example a sidebar widget).
  • Admin Bar aware: checks if the current user has an Admin Toolbar at the top of the page. If it has, the sticky element will not obscure it (or be obscured by it).
  • Z-index: in case there are other elements on the page that obscure or peek through your sticky element, you can add a Z-index easily.
  • Legacy Mode: in 2.0, a new method of making things sticky was introduced. In Legacy Mode, the old method will be used. See FAQ for details.
  • Dynamic Mode: some issues that frequently appear in responsive themes have been address by adding a Dynamic Mode (Legacy Mode only). See FAQ for details.
  • Debug Mode: find out possible reasons why your element doesn't stick by switching on Debug Mode, and error messages will appear in your browser's console.

Requires: 3.6 or higher
Compatible up to: 4.6.2
Last Updated: 5 months ago
Active Installs: 20,000+

Ratings

4.8 out of 5 stars

Support

17 of 40 support threads in the last two months have been marked resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,1,1 100,1,1 100,1,1 100,3,3
100,1,1 100,1,1
0,1,0 100,3,3
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,3,3
100,2,2
100,1,1 100,1,1 100,1,1
100,3,3
100,2,2
100,1,1
100,1,1