How to Add a Sticky Header to WordPress (5 Methods That Work in 2026)

A laptop showing a website with its navigation header fixed at the top while the page scrolls — how to add a sticky header to WordPress

A sticky header keeps your navigation visible while visitors scroll, so the menu and call-to-action button are always one click away. If you want to know how to add a sticky header to WordPress, the good news is that you have five solid ways to do it in 2026, and none of them requires rebuilding your site.

If you are learning how to add a sticky header to WordPress, start with what your theme already offers: a GeneratePress site takes one toggle, a block theme takes one setting in the Site Editor, and any other theme can be fixed with a free plugin or a short CSS snippet.

This guide covers all five methods for how to add a sticky header to WordPress, with prices verified 24 November 2026, so you can pick the one that fits your site and be done in under half an hour. It is a small change with an outsized effect: visitors on a long page no longer scroll back to the top to find the menu.

In this guide

The short answer: how to add a sticky header to WordPress

If you run GeneratePress, enable the sticky navigation module in GP Premium — the quickest answer to how to add a sticky header to WordPress on that theme, at $59 a year and about two minutes. If you run any other theme, install the free My Sticky Bar plugin and turn on its sticky menu option: it works with almost every theme and costs nothing to start.

Elementor Pro users should use the Theme Builder’s sticky setting, from $60 a year. Block-theme owners get the same result free in the Site Editor, and a four-line CSS rule works on any theme. The table below compares all five methods at a glance.

Sticky vs fixed: what is the difference?

A sticky header and a fixed header look identical once you are scrolling, but they behave differently at the top of the page. A sticky header scrolls normally until it reaches the top, then stops and stays there. A fixed header never moves: it is removed from the page flow and sits on top of everything from the moment the page loads.

The difference matters for two reasons. First, a fixed header can cover the top of your content unless you add padding to compensate, while a sticky header never creates that gap. Second, a sticky header is the native CSS behaviour — position: sticky — so it needs no JavaScript.

Every method in this guide produces a sticky header, not a fixed one, because sticky is the safer default. If your theme advertises a “fixed header”, it usually means the same result — the question is how to add a sticky header to WordPress that behaves the way you expect.

The 5 methods at a glance

Here is the quick comparison. Cost is what you pay for the sticky feature itself, not for the theme or builder you may already own.

Method Cost (verified Nov 2026) Difficulty Best for
GeneratePress Premium $59/yr (GP Premium); $149/yr (GP One) Easy GeneratePress sites
My Sticky Bar plugin Free; Pro from $49/yr Easy Any theme, no code
Elementor Pro From $60/yr (Essential) Medium Elementor-built sites
Custom CSS Free Medium Any theme, full control
Block theme Site Editor Free (WordPress 6.2+) Easy Block themes

Three of the five methods cost nothing extra: the Site Editor is core WordPress, CSS is free, and My Sticky Bar has a capable free version. The paid options only make sense when you already pay for them. The sections below show how to add a sticky header to WordPress with the tools you already have.

Method 1: GeneratePress Premium sticky navigation

GeneratePress is the theme this site runs on, and its sticky navigation is the cleanest option in this guide — if your site already runs GeneratePress. The free theme does not include it: sticky navigation is part of GP Premium, the plugin that adds the theme’s extra modules, at $59 a year, or $149 a year for the GeneratePress One bundle with GenerateBlocks Pro and GenerateCloud. See GeneratePress official pricing for the current figures.

The sticky option lives in the Menu Plus module: it keeps the primary navigation at the top of the screen as visitors scroll, with settings for the transition effect and for whether the navigation shrinks. Because it is part of the theme, there is no extra plugin to update and no extra JavaScript to load. See our GeneratePress vs Astra vs Kadence comparison for how the three differ on headers and speed.

How to enable sticky navigation in GeneratePress

Install and activate GP Premium next to the free theme, then go to Appearance → GeneratePress and switch on the Menu Plus module. Next, open the Customizer → Layout → Primary Navigation and turn on Sticky Navigation. Choose the transition effect — slide, fade, or none — and whether the navigation shrinks when it sticks. Publish, clear your cache, and scroll a page to confirm the menu stays put. That is how to add a sticky header to WordPress on GeneratePress, in about two minutes.

The same screen controls the mobile header, so check the result on a phone as well as on a desktop. If it looks right on desktop but not on mobile, the mobile header settings are the place to look.

Method 2: My Sticky Bar (free plugin)

If your theme has no sticky option, a dedicated plugin is the fastest way to learn how to add a sticky header to WordPress. My Sticky Bar — formerly myStickymenu — is the most-installed option in this guide: free on WordPress.org, with 100,000+ active installs and a 4.9 out of 5 rating from about 1,199 reviews, last updated 28 October 2026 and tested up to WordPress 7.1.4. See its WordPress.org listing for the current figures.

The free version makes your menu or header sticky after a scroll distance you choose, and also builds announcement bars. Pro, from $49 a year for one site — $69 for two years, or $149 lifetime — adds page-level targeting, disabling on scroll down, and custom CSS for the header. The plugin is actively maintained and works with almost any theme.

A second free option, Sticky Menu & Sticky Header by WebFactory, does the same job for any element you pick by CSS selector: 90,000+ active installs, 4.7 out of 5 from 763 reviews, version 2.36, updated 16 August 2026, tested up to WordPress 7.1.4, with Pro from $39 one-time.

How to set up My Sticky Bar

Install it from Plugins → Add New, and activate it. Go to Settings → My Sticky Bar and turn on the sticky menu option. The plugin detects most themes’ headers on its own; if it cannot find yours, enter the header’s CSS selector — common ones are #site-navigation and .site-header. Set the scroll distance to 0 to stick immediately, or higher to let the header scroll away. Save, clear your cache, and test in a private window.

If the plugin cannot find your header, copy its class with Inspect. Our guide to adding a menu in WordPress covers finding your menu’s location. That is the only fiddly part of how to add a sticky header to WordPress with a plugin.

WordPress admin settings panel with toggle switches for header and navigation options

Method 3: Elementor Pro and the Theme Builder

If your site is built with Elementor, the sticky header belongs in the Theme Builder, not in a separate plugin. The free plugin cannot build headers at all: the Theme Builder, including sticky headers, is a Pro feature. Elementor Pro starts at $60 a year for the Essential plan for one site, with Advanced Solo at $84 a year and Advanced at $108 a year for three sites; Expert, for 25 sites, costs $204 a year. All four plans include the Theme Builder, so the cheapest plan is enough. Prices are list prices verified 24 November 2026.

The advantage is design control: you decide exactly what sticks, and you can set a different header for different parts of the site. But this only makes sense if you already use Elementor Pro — do not buy a page builder for one toggle.

How to make a sticky header in Elementor Pro

Go to Templates → Theme Builder → Header and add a new header. Design it with the logo and navigation menu widgets, then select the section holding the whole header. In the Advanced tab, open Motion Effects and set Sticky to Top with an offset of 0. Set the devices and a display condition for the entire site, and publish. Those steps are how to add a sticky header to WordPress when Elementor already builds your site.

Give the header a solid background colour before you publish. A transparent header looks elegant at the top, but page text will show through it once you scroll. Test on a phone too: Elementor lets you hide or restyle the header per device.

Method 4: Custom CSS with position: sticky

If you want to know how to add a sticky header to WordPress without installing anything, custom CSS works on every theme, costs nothing, and adds no plugin. The core of it is one CSS rule: position: sticky with top: 0 and a z-index high enough to sit above the page content. You also need a background colour on the header, or page text will show through it.

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #ffffff;
}

That is the whole method: four declarations. The selector is the part that changes from theme to theme. Common header selectors are .site-header, #masthead, and header; use your browser’s Inspect tool to copy the class or ID it uses. If the rule does nothing, the selector is the reason.

How to add the CSS safely

Never edit your theme’s files directly. Go to Appearance, then Customize, then Additional CSS, paste the rule there, and publish — or add it to a child theme if you already use one. Our guide to adding custom CSS to WordPress covers the safe routes.

One detail catches almost everyone learning how to add a sticky header to WordPress with CSS: when you are logged in, WordPress adds a 32px admin bar, and a header stuck at top: 0 will slide underneath it. Add a second rule, body.admin-bar .site-header { top: 32px; }, so the header stops below the bar while you are logged in. Below 782px the bar is 46px tall.

Method 5: Block themes and the Site Editor

If your site uses a block theme — you see Appearance, then Editor, in the dashboard — the Site Editor has offered a built-in answer to how to add a sticky header to WordPress since version 6.2, with no plugin and no code. The trick is to make the block around the header sticky, not a block inside it: a sticky block only sticks within its parent.

This is the easiest free method here, and the only one that needs no installation. One quirk: the change applies to one template at a time, so Single Posts, Pages, and Blog Home each need the same treatment. If that sounds tedious, the CSS in Method 4 covers all templates at once.

How to make a block theme header sticky

Go to Appearance → Editor → Templates and open a template such as Single Posts. Click the header and confirm the Header template part is selected, not a block inside it — List View makes this easy. Open the block’s three-dot menu and select Group. In the block settings, find the Position panel and change it from Default to Sticky. Give the Group a background colour matching the page, and click Save. That is how to add a sticky header to WordPress on a block theme.

WordPress outputs position: sticky, top: 0, and a z-index of 10 for a sticky Group block. That z-index is low: if a slider or gallery overlaps your header, raise it with CSS as shown in Method 4.

Which method should you choose?

Choose by what you already own. On GeneratePress, use GP Premium; on a block theme, use the Site Editor; if you already use Elementor Pro, use the Theme Builder. If your theme has no built-in option and you do not want code, install My Sticky Bar. Use custom CSS only when you want precise control, or when a plugin cannot find your header’s selector. That is the short version of how to add a sticky header to WordPress: match the method to the tools you already pay for.

Avoid stacking two methods: a theme toggle plus a plugin, or a plugin plus CSS, will fight over the same header. Pick one, test it, and remove the others. If you are still choosing the foundations for a new site, start with our best WordPress hosting guide — a fast host matters more than any header effect — and our table of contents guide shows another navigation aid that pairs well with it.

Troubleshooting sticky header problems

Most sticky header problems come from a missing background, a z-index fight, or stale cache. Work through them in order, testing after each change — and do not add a second method on top of the first, the most common mistake when learning how to add a sticky header to WordPress.

The header overlaps content or text shows through it

A sticky header without a background colour is transparent, so page text scrolls visibly underneath it. Give the header a solid background in the theme, plugin, or CSS settings. If content jumps when the header sticks, two methods are probably active: turn one off and test again.

The header does not stick on mobile

Many themes and plugins disable the sticky effect below a certain screen width to save space. Check for a mobile toggle first. If there is none, test with a real phone rather than a resized desktop window.

Another element covers the header

Sliders, popups, and galleries often use high z-index values, and a low header slides underneath them. Raise the header’s z-index — 999 is safe — in the plugin settings or in CSS. If that changes nothing, a parent element with a transform or opacity rule may be creating a new stacking context.

Changes do not appear after saving

This is almost always cache. Clear your caching plugin, CDN cache, and browser cache, then test in a private window. If the change still does not show, check that you edited the right place: in a block theme, each template has its own copy of the header. Our guide to speeding up WordPress explains caching layers in detail.

Hand holding a smartphone showing a mobile website with its header pinned at the top while content scrolls

When not to use a sticky header

A sticky header is not right for every site. On a short landing page, it adds nothing and eats screen space. On mobile, a tall sticky header can cover a third of the viewport: if your header is over about 80px tall on phones, disable it there or shrink it.

Sites built around long reading sometimes do better with a slim sticky bar that appears only when scrolling up. And if your header already carries an announcement bar, a cookie banner, and a menu, stacking all three as sticky will crowd the screen: pin the menu only. Test on a real phone, measure the header height, and if the header hides more content than it saves in clicks, switch it off. Knowing when not to use one is part of knowing how to add a sticky header to WordPress well.

Frequently asked questions

How do I add a sticky header to WordPress without a plugin?

Use the Site Editor if you run a block theme: wrap the header template part in a Group block and set its Position to Sticky, a core feature since WordPress 6.2. If you run a classic theme with a built-in toggle, such as GeneratePress with GP Premium, use that. Otherwise, a few lines of CSS with position: sticky do the same job with no plugin installed.

Is a sticky header bad for SEO or speed?

No. A CSS sticky header adds no JavaScript and no measurable load time, and search engines treat it like any other header. A plugin adds a small script, usually a few kilobytes, which is negligible on a well-built site. What can hurt speed is a heavy header: large images, video backgrounds, and oversized logos cost far more than the sticky behaviour itself, so keep the header light.

Why is my sticky header not working?

The most common causes are a wrong CSS selector, a sticky setting applied to a block inside the header instead of the block around it, a second sticky method fighting the first, or stale cache hiding the change. Check the selector with your browser’s Inspect tool, confirm only one method is active, and clear every cache layer before testing again in a private window. If you followed a tutorial for how to add a sticky header to WordPress and it still fails, the selector is the first thing to re-check.

How do I make a sticky header only on desktop?

In a plugin, look for a disable-on-mobile or screen-size setting — My Sticky Bar includes one. With CSS, wrap the rule in a media query so it only applies above a width you choose, for example @media (min-width: 769px) { .site-header { position: sticky; top: 0; z-index: 999; } }. With Elementor, set the sticky section’s visibility per device in the section settings.

Does Elementor free have a sticky header?

No. Sticky headers need the Theme Builder, which is an Elementor Pro feature, and the free plugin cannot build headers at all. Elementor Pro starts at $60 a year for the Essential plan for one site, and all four Pro plans include the Theme Builder. If you are weighing how to add a sticky header to WordPress on an Elementor site and a sticky header is the only Pro feature you need, a free plugin is the cheaper route.

Can I make only part of the header sticky?

Yes. Apply the sticky behaviour to the navigation row only, and let the logo row scroll away: in CSS, target the menu’s selector instead of the whole header. In a plugin, point it at the menu element rather than the header element. In Elementor, build the header as two sections and set only the lower one to sticky. This keeps the header slim while scrolling, which works well on mobile, and it is the same technique behind most tutorials for how to add a sticky header to WordPress that keeps the logo out of the way.

Verdict

Our verdict: The fastest way to learn how to add a sticky header to WordPress is the free My Sticky Bar plugin: it works with almost any theme, costs nothing, and takes ten minutes. GeneratePress owners should use the GP Premium sticky navigation instead — the native answer to how to add a sticky header to WordPress on that theme — block-theme owners should use the Site Editor’s built-in sticky position, and Elementor Pro users should build the header in the Theme Builder. Custom CSS is best when you want exact control and no extra plugin. Whichever method you pick, give the header a solid background, test it on a real phone, clear your cache, and use only one method at a time.

Leave a Comment