How to Add a Sticky Menu in WordPress (Without Elementor Pro)

On this page
A sticky menu keeps your navigation visible as visitors scroll, so they can move around your site without scrolling back up. You do not need Elementor Pro for it; here are three free methods. (Using Elementor Pro? See making a sticky header with Elementor.)
Method 1: Your theme's setting
Many themes include a sticky header option. Look in Appearance > Customize > Header for "Sticky header" or "Fixed header". Some themes offer it only in their premium add-on. Block themes may allow sticky positioning on the header group in the site editor.
Method 2: A free plugin
Search Plugins > Add New Plugin for "sticky menu". These plugins let you pick the element to stick (using its CSS selector), set the distance from the top and disable it on small screens. Choose a lightweight, recently updated option.
Method 3: A few lines of CSS
- Find your header's CSS class: right-click the header, choose Inspect and note the class of the outer header element (for example
.site-header). - Go to Appearance > Customize > Additional CSS (classic themes) or the site editor's custom CSS (block themes).
- Add:
.site-header { position: sticky; top: 0; z-index: 999; background: #fff; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
Replace .site-header with your theme's class. The admin-bar lines stop the header hiding under the WordPress toolbar when you are logged in.
Fixing common problems
- Nothing happens: a parent element has
overflow: hidden, or you targeted the inner menu instead of the outer header. - Content shows through: add a solid background color.
- Dropdowns hidden behind content: raise the z-index.
- Too tall on phones: wrap the rule in a desktop-only media query.
Want a floating button instead of a whole menu? See adding a sticky Book Now button.
Frequently asked questions
What is the difference between a sticky menu and a sticky header?
A sticky header keeps the whole header (logo, menu, button) fixed. A sticky menu can be just the navigation bar. In practice the terms are often used interchangeably.
Why does position sticky not work on my menu?
A parent element with overflow set to hidden, or a parent that is only as tall as the menu, stops sticky positioning. Apply it to the outer header element instead.
Is a sticky menu good for mobile?
Keep it slim. A tall sticky menu takes too much screen space on phones; many sites make it sticky only on larger screens.
Can I add a sticky menu to a block theme?
Yes. Some block themes and the site editor offer sticky positioning for the header group; otherwise use the CSS method.


