{"id":60688,"date":"2024-12-20T07:00:00","date_gmt":"2024-12-20T15:00:00","guid":{"rendered":"https:\/\/dhblog.dream.press\/blog\/?p=60688"},"modified":"2025-05-27T06:44:54","modified_gmt":"2025-05-27T13:44:54","slug":"sticky-header","status":"publish","type":"post","link":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/","title":{"rendered":"3 Simple Ways To Create a Fixed (Sticky) Header in WordPress"},"content":{"rendered":"\n<p>Your website&#8217;s navigation may be slipping away\u2026 So <em>stick<\/em> around to learn how to keep it fixed!<\/p>\n\n\n\n<p>OK, bad puns aside, keeping your site&#8217;s navigation easily accessible is key to enhancing user experience. <strong>Enter the sticky header, a fixed navigation bar that remains visible as users scroll down your page.<\/strong><\/p>\n\n\n\n<p>This handy feature keeps menu items and calls-to-action within reach no matter how far users scroll \u2014a game-changer for small business owners aiming to boost engagement and <a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/increase-website-conversion-rate\/\" rel=\"noopener\">conversions<\/a>.<\/p>\n\n\n\n<p>In this tutorial, we&#8217;ll explore three simple ways to create a sticky header in WordPress, catering to all skill levels \u2014from beginners to those comfortable with a bit of coding. Whether you prefer using a plugin, leveraging your theme&#8217;s built-in settings, or adding custom CSS, we&#8217;ve got you covered.<\/p>\n\n\n\n<h2 id=\"h-why-sticky-headers-take-your-website-up-a-notch\" class=\"wp-block-heading\">Why Sticky Headers Take Your Website Up a Notch<\/h2>\n\n\n\n<p>Before we dive into the how-to, let&#8217;s look at why you might want to use a sticky header in the first place.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1600\" height=\"1500\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_benefits_of_using_sticky_headers.webp\" alt=\"Four visual examples showing a sticky header with benefits: a cursor showing nav ability, increase in UX, focus on &quot;book now&quot; button, and a magnified logo for brand consistency. \" class=\"wp-image-60697 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_benefits_of_using_sticky_headers.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_benefits_of_using_sticky_headers-300x281.webp 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_benefits_of_using_sticky_headers-1024x960.webp 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_benefits_of_using_sticky_headers-768x720.webp 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_benefits_of_using_sticky_headers-1536x1440.webp 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_benefits_of_using_sticky_headers-600x563.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_benefits_of_using_sticky_headers-1200x1125.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_benefits_of_using_sticky_headers-730x684.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_benefits_of_using_sticky_headers-1460x1369.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_benefits_of_using_sticky_headers-784x735.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_benefits_of_using_sticky_headers-1568x1470.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_benefits_of_using_sticky_headers-877x822.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/1500;\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">1. Enhanced Navigability<\/h3>\n\n\n\n<p>A sticky header keeps your site&#8217;s main menu in constant view, eliminating the need for visitors to scroll back to the top when they want to move on to a different page. This ease of movement can make browsing your site more intuitive and enjoyable, especially if you have content-rich pages that require a lot of scrolling.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Better User Experience<\/h3>\n\n\n\n<p>By keeping essential information and navigation links readily accessible, you reduce friction in the user journey. That kind of seamless browsing experience can lead to longer site visits and a lower bounce rate, signaling to search engines that your <a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/how-to-come-up-with-new-content-ideas\/\" rel=\"noopener\">content<\/a> is valuable and engaging.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Increased Conversions<\/h3>\n\n\n\n<p>Imagine having a persistent &#8220;Book Now&#8221; or &#8220;Contact Us&#8221; button that follows your visitors wherever they go on your site. A sticky header allows you to keep important<a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/call-to-action-examples\/\" rel=\"noopener\"> calls-to-action <\/a>front and center, gently encouraging users to take the next step \u2014whether that&#8217;s making a purchase, signing up for a newsletter, or booking a service.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Brand Consistency<\/h3>\n\n\n\n<p>A fixed header keeps your logo and other brand elements visible at all times. This constant reinforcement can strengthen brand recognition and trust, making your business more memorable to potential customers.<\/p>\n\n\n\n<h2 id=\"h2_3-simple-ways-to-create-a-fixed-sticky-header-in-wordpress\" class=\"wp-block-heading\">3 Simple Ways To Create a Fixed (Sticky) Header in WordPress<\/h2>\n\n\n\n<p>Now that we know <em>why<\/em> you want a sticky header for your WordPress site, let&#8217;s talk about <em>how<\/em> you get one.<\/p>\n\n\n\n<p>Below, we&#8217;ll guide you through three methods to add a sticky header to your WordPress site, starting with the easiest and progressing to more advanced techniques.<\/p>\n\n\n\n<p><strong>Choose your own adventure: the one that best fits your comfort level and the needs of your website.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Method 1: Using a WordPress Plugin (Easy)<\/h3>\n\n\n\n<p>For those who prefer a no-code solution, <a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/best-wordpress-plugins\/\" rel=\"noopener\">WordPress plugins<\/a> offer a quick and user-friendly way to add a sticky header. Plugins are especially beneficial if you&#8217;re new to WordPress or want to implement the feature without delving into technical details.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Recommended Plugins<\/h4>\n\n\n\n<p><a target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/mystickymenu\/\" rel=\"noopener\"><strong>My Sticky Bar<\/strong><\/a><\/p>\n\n\n\n<p>Features:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Simple setup process.<\/li>\n\n\n\n<li>Customizable appearance and behavior.<\/li>\n\n\n\n<li>Option to make any element sticky, not just the header.<\/li>\n<\/ul>\n\n\n\n<p><a target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/sticky-menu-or-anything-on-scroll\/\" rel=\"noopener\"><strong>Sticky Menu<\/strong><\/a><strong> (or Anything!) on Scroll<\/strong><\/p>\n\n\n\n<p>Features:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Flexibility to stick any element.<\/li>\n\n\n\n<li>Offset options to control when the sticky effect kicks in.<\/li>\n\n\n\n<li>Compatibility with most themes.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">What to do<\/h4>\n\n\n\n<p><strong>Step 1: Install the plugin<\/strong><\/p>\n\n\n\n<p>Log into your WordPress dashboard. Navigate to <strong>Plugins <\/strong>&gt;<strong> Add New Plugin<\/strong>. In the search bar, type the name of your chosen plugin, install it, and activate it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1600\" height=\"1162\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/02_install_the_plugin.webp\" alt=\"zoomed in screenshot of the &quot;My Sticky Menu&quot; plugin showing the search term &quot;my sticky bar&quot; and the subsequent result pointing to the &quot;install now&quot; button \" class=\"wp-image-60690 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/02_install_the_plugin.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/02_install_the_plugin-300x218.webp 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/02_install_the_plugin-1024x744.webp 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/02_install_the_plugin-768x558.webp 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/02_install_the_plugin-1536x1116.webp 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/02_install_the_plugin-600x436.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/02_install_the_plugin-1200x872.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/02_install_the_plugin-730x530.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/02_install_the_plugin-1460x1060.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/02_install_the_plugin-784x569.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/02_install_the_plugin-1568x1139.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/02_install_the_plugin-877x637.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/1162;\" \/><\/figure>\n\n\n\n<p><strong>Step 2: Configure the plugin (if needed)<\/strong><\/p>\n\n\n\n<p>Identify the header element you want to make sticky. Use your <a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/how-to-inspect-a-website\/\" rel=\"noopener\">browser&#8217;s &#8220;Inspect Element&#8221; tool <\/a>to find the exact selector if needed. Enter the selector into the plugin&#8217;s settings.<\/p>\n\n\n\n<p>To do this, open your website in a browser, <strong>right-click<\/strong> on your header, and select <strong>Inspect<\/strong> or <strong>Inspect Element<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1600\" height=\"999\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/05_inspect.webp\" alt=\"inspect element on dreamhost home page\" class=\"wp-image-60694 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/05_inspect.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/05_inspect-300x187.webp 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/05_inspect-1024x639.webp 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/05_inspect-768x480.webp 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/05_inspect-1536x959.webp 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/05_inspect-600x375.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/05_inspect-1200x749.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/05_inspect-730x456.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/05_inspect-1460x912.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/05_inspect-784x490.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/05_inspect-1568x979.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/05_inspect-877x548.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/999;\" \/><\/figure>\n\n\n\n<p>Common selectors include <strong>#site-header<\/strong> or <strong>.main-header<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1600\" height=\"757\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/06_div_class.webp\" alt=\"dreamhost's inspect element\" class=\"wp-image-60695 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/06_div_class.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/06_div_class-300x142.webp 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/06_div_class-1024x484.webp 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/06_div_class-768x363.webp 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/06_div_class-1536x727.webp 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/06_div_class-600x284.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/06_div_class-1200x568.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/06_div_class-730x345.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/06_div_class-1460x691.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/06_div_class-784x371.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/06_div_class-1568x742.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/06_div_class-877x415.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/757;\" \/><\/figure>\n\n\n\n<p><strong>Note<\/strong>: To learn more about using your browser\u2019s developer tools, please read our guide on <a target=\"_blank\" href=\"https:\/\/help.dreamhost.com\/hc\/en-us\/articles\/360031248971-Viewing-your-website-s-headers\" rel=\"noopener\"><em>Viewing your website&#8217;s headers<\/em><\/a>.<\/p>\n\n\n\n<p>Depending on the plugin you chose, you may be able to customize other options, like <a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/css-animation\/\" rel=\"noopener\">adding animation effects<\/a> or changing the scroll distance before the header becomes sticky.<\/p>\n\n\n\n<p><strong>Step 3: Save changes and test<\/strong><\/p>\n\n\n\n<p>Click <strong>Save<\/strong> or <strong>Apply<\/strong> to confirm your settings. Visit your website to test the sticky header. Scroll down to see if the header remains fixed at the top, and be sure to check on different devices.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Method 2: Using Your Theme&#8217;s Built-In Settings (Moderate)<\/h3>\n\n\n\n<p>Many modern <a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/how-to-pick-wordpress-theme\/\" rel=\"noopener\">WordPress themes<\/a> come with built-in options to enable a sticky header. This method offers seamless integration with your site&#8217;s design and avoids the need for additional plugins.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Popular Themes With Sticky Header Options<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a target=\"_blank\" href=\"https:\/\/wpastra.com\/pricing\/?campaign=DHblog&amp;bsf=10463\" rel=\"noopener\">Astra<\/a><\/li>\n\n\n\n<li><a target=\"_blank\" href=\"https:\/\/oceanwp.org\/\" rel=\"noopener\">OceanWP<\/a><\/li>\n\n\n\n<li><a target=\"_blank\" href=\"https:\/\/www.elegantthemes.com\/gallery\/divi\/\" rel=\"noopener\">Divi<\/a><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">What to do<\/h4>\n\n\n\n<p><strong>Step 1: Access the theme customizer<\/strong><\/p>\n\n\n\n<p>In your WordPress dashboard, navigate to <strong>Appearance <\/strong>&gt;<strong> Customize<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"641\" height=\"720\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/03_install_the_plugin.webp\" alt=\"zoomed in screenshot of the WP nav calling attention to the &quot;customize&quot; button underneath &quot;themes&quot; under &quot;appearance&quot; \" class=\"wp-image-60691 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/03_install_the_plugin.webp 641w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/03_install_the_plugin-267x300.webp 267w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/03_install_the_plugin-600x674.webp 600w\" data-sizes=\"(max-width: 641px) 100vw, 641px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 641px; --smush-placeholder-aspect-ratio: 641\/720;\" \/><\/figure>\n\n\n\n<p><strong>Step 2: Find your header settings<\/strong><\/p>\n\n\n\n<p>In the customizer sidebar, look for sections labeled \u201cHeader,\u201d \u201cMenu,\u201d or \u201cNavigation\u201d Click on the relevant section to access header settings.<\/p>\n\n\n\n<p><strong>Step 3: Enable the sticky header option<\/strong><\/p>\n\n\n\n<p>Find the setting labeled \u201cSticky Header,\u201d \u201cFixed Header,\u201d or \u201cEnable on Scroll.\u201d Toggle the option to <strong>On<\/strong> or <strong>Enable<\/strong>.<\/p>\n\n\n\n<p><strong>Step 4: Customize other settings (if applicable)<\/strong><\/p>\n\n\n\n<p>There may be other settings you can personalize, if you want to, like the <a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/website-color-schemes\/\" rel=\"noopener\">background color<\/a>, transparency levels, logo size while scrolling, etc. Use the live preview to see your changes in real time.<\/p>\n\n\n\n<p><strong>Step 5: Publish and test<\/strong><\/p>\n\n\n\n<p>Click <strong>Publish<\/strong> to save your changes. Visit your site to verify the sticky header functionality. Test on multiple pages and make sure to check its <a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/how-to-optimize-your-site-for-mobile\/\" rel=\"noopener\">responsiveness on tablets and smartphones<\/a>.<\/p>\n\n\n\n<div class=\"article-newsletter article-newsletter--gradient\">\n\n\n<h2>Get Content Delivered Straight to Your Inbox<\/h2><p>Subscribe now to receive all the latest updates, delivered directly to your inbox.<\/p><form class=\"nwsl-form\" id=\"newsletter_block_\" novalidate><div class=\"messages\"><\/div><div class=\"form-group\"><label for=\"input_newsletter_block_\"><input type=\"email\"name=\"email\"id=\"input_newsletter_block_\"placeholder=\"Enter your email address\"novalidatedisabled=\"disabled\"\/><\/label><button type=\"submit\"class=\"btn btn--brand\"disabled=\"disabled\"><span>Sign Me Up!<\/span><svg width=\"21\" height=\"14\" viewBox=\"0 0 21 14\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n<path d=\"M13.8523 0.42524L12.9323 1.34521C12.7095 1.56801 12.7132 1.9304 12.9404 2.14865L16.7241 5.7823H0.5625C0.251859 5.7823 0 6.03416 0 6.3448V7.6573C0 7.96794 0.251859 8.2198 0.5625 8.2198H16.7241L12.9405 11.8535C12.7132 12.0717 12.7095 12.4341 12.9323 12.6569L13.8523 13.5769C14.072 13.7965 14.4281 13.7965 14.6478 13.5769L20.8259 7.39879C21.0456 7.17913 21.0456 6.82298 20.8259 6.60327L14.6477 0.42524C14.4281 0.205584 14.0719 0.205584 13.8523 0.42524Z\" fill=\"white\"\/>\n<\/svg>\n<\/button><\/div><\/form><\/div>\n\n\n<h3 class=\"wp-block-heading\">Method 3: DIY with Custom CSS (Advanced)<\/h3>\n\n\n\n<p>If you&#8217;re comfortable with a bit of coding, adding custom <a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/glossary\/web-design\/css\/\" rel=\"noopener\">CSS<\/a> allows for maximum customization and control over your sticky header&#8217;s behavior and appearance.<\/p>\n\n\n\n<p>Again, you&#8217;ll need to identify your header element. Open your website in a browser, right-click on your header, and select<strong> Inspect<\/strong> or <strong>Inspect Element<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1600\" height=\"999\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/07_inspect_header.webp\" alt=\"inspect element\" class=\"wp-image-60696 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/07_inspect_header.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/07_inspect_header-300x187.webp 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/07_inspect_header-1024x639.webp 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/07_inspect_header-768x480.webp 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/07_inspect_header-1536x959.webp 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/07_inspect_header-600x375.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/07_inspect_header-1200x749.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/07_inspect_header-730x456.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/07_inspect_header-1460x912.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/07_inspect_header-784x490.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/07_inspect_header-1568x979.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/07_inspect_header-877x548.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/999;\" \/><\/figure>\n\n\n\n<p>Note the CSS selector for your header. Common selectors include <strong>header<\/strong>, <strong>#masthead<\/strong>, and <strong>.site-header<\/strong>, so look for those.<\/p>\n\n\n<div class=\"single__related-article\">\n\t<span>Related Article<\/span>\n\t<div class=\"single__related-article__wrap\">\n\t\t<div class=\"single__related-article__title\">\n\t\t\tHow to Learn CSS In 2026 (Fast &amp; Free)\n\t\t<\/div>\n\t\t<a href=\"https:\/\/www-dev.dreamhost.com\/blog\/learn-css\/\" class=\"btn btn--sm btn--brand\" target=\"_blank\" rel=\"noopener\">\n\t\t\tRead More\n\t\t<\/a>\n\t<\/div>\n<\/div>\n\n\n<h4 class=\"wp-block-heading\">What to do<\/h4>\n\n\n\n<p><strong>Step 1: Go to your additional CSS editor<\/strong><\/p>\n\n\n\n<p>Go to <strong>Appearance <\/strong>&gt;<strong> Customize<\/strong> in your WordPress dashboard. Click on <strong>Additional CSS<\/strong> at the bottom of the customizer sidebar.<\/p>\n\n\n\n<p><strong>Step 2: Insert custom CSS code<\/strong><\/p>\n\n\n\n<p>Insert custom code into the CSS editor. Replace <strong>header<\/strong> with your specific header selector if different (e.g., <strong>.site-header<\/strong>).<\/p>\n\n\n\n<p>Here&#8217;s a sample sticky header code you can use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* Make the header sticky *\/\nheader {\n    position: fixed;\n    top: 0;\n    width: 100%;\n    z-index: 9999;\n}\n\n\/* Prevent content from hiding behind the header *\/\nbody {\n    margin-top: 80px; \/* Adjust this value to match your header's height *\/\n}<\/code><\/pre>\n\n\n\n<p><strong>Step 3: Adjust the margin<\/strong><\/p>\n\n\n\n<p>Modify the <strong>margin-top<\/strong> value in the <strong>body<\/strong> rule to match the exact height of your header. For example, if your header is 100 pixels tall, set <strong>margin-top: 100px;<\/strong>.<\/p>\n\n\n\n<p><strong>Step 4: Publish and test<\/strong><\/p>\n\n\n\n<p>Click <strong>Publish<\/strong> to apply your changes. Visit your site to make sure your header remains fixed at the top when scrolling and there&#8217;s no overlap between the header and the content below. Test on different devices and browsers to make sure it&#8217;s consistent, too.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Troubleshooting Tips<\/h4>\n\n\n\n<p><strong>1. Overlapping content<\/strong><\/p>\n\n\n\n<p>If the content below the header is hidden, adjust the <strong>margin-top<\/strong> value.<\/p>\n\n\n\n<p><strong>2. Mobile responsiveness<\/strong><\/p>\n\n\n\n<p>If your sticky header takes up too much space on mobile, you can revert it to a normal, non-sticky header for screens below a certain width. For example, if you want to disable the sticky header on devices narrower than 600 pixels, you could add:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@media (max-width: 600px) {\n    header {\n        position: static; \/* Removes the fixed (sticky) positioning *\/\n        margin-top: 0;    \/* Adjusts the layout back to normal *\/\n    }\n    body {\n        margin-top: 0;    \/* Remove the top margin that was compensating for the sticky header *\/\n    }\n}<\/code><\/pre>\n\n\n\n<p><strong>3. Z-index issues<\/strong><\/p>\n\n\n\n<p>Increase the <strong>z-index<\/strong> value if the header is appearing behind other elements.<\/p>\n\n\n\n<h2 id=\"h2_should-you-add-a-sticky-header-the-ongoing-debate\" class=\"wp-block-heading\">Should You Add a Sticky Header? The Ongoing Debate<\/h2>\n\n\n\n<p>While sticky headers can enhance user experience, opinions vary among web designers and users. One <a target=\"_blank\" href=\"https:\/\/www.reddit.com\/r\/web_design\/comments\/1ae2g0k\/are_stickyfixed_headers_going_out_of_style\/\" rel=\"noopener\">Reddit discussion<\/a> captures this debate, with some arguing that sticky headers are intrusive, while others believe they&#8217;re essential for modern navigation.<\/p>\n\n\n\n<p>To sum it up, here are some of the pros and cons of sticky headers:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Pros of Sticky Headers<\/strong><\/td><td><strong>Cons of Sticky Headers<\/strong><\/td><\/tr><tr><td><strong>Improved navigation: <\/strong>Users have constant access to the menu, making site exploration effortless.<br><strong>Increased conversions: <\/strong>Persistent calls-to-action can encourage users to engage more readily.<br><strong>Better engagement: <\/strong>For content-heavy sites, sticky headers keep important options within reach.<\/td><td><strong>Screen space consumption: <\/strong>On smaller screens, sticky headers can take up valuable real estate.<br><strong>Potential distraction: <\/strong>If not designed thoughtfully, they can divert attention from your content.<br><strong>Performance impact: <\/strong>Un-optimized sticky headers may affect page loading times.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">When in Doubt, Consider Your Audience<\/h3>\n\n\n\n<p>According to research, sticky header preferences can vary by demographic. Who would\u2019ve thought, eh?<\/p>\n\n\n\n<p><a target=\"_blank\" href=\"https:\/\/contentsquare.com\/blog\/the-3-golden-rules-of-sticky-menu-navigation\/\" rel=\"noopener\">Contentsquare&#8217;s insights<\/a> report that younger users might appreciate the convenience, while older audiences could find it confusing or obstructive. Aligning your design choices with your target audience&#8217;s preferences is crucial.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Best Practices<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Minimalist design: <\/strong>Keep the header clean and uncluttered to minimize distraction.<\/li>\n\n\n\n<li><strong>User control: <\/strong>Offer options for users to collapse or hide the sticky header if they prefer.<\/li>\n\n\n\n<li><strong>Responsiveness: <\/strong>Make sure the sticky header adapts well to different screen sizes, or consider hiding it on mobile devices.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1600\" height=\"877\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/04_sticky_responsive_design.webp\" alt=\"Responsive design showing the different sticky footer view between smartphone, tablet and desktop set at the top of the page\" class=\"wp-image-60692 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/04_sticky_responsive_design.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/04_sticky_responsive_design-300x164.webp 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/04_sticky_responsive_design-1024x561.webp 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/04_sticky_responsive_design-768x421.webp 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/04_sticky_responsive_design-1536x842.webp 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/04_sticky_responsive_design-600x329.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/04_sticky_responsive_design-1200x658.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/04_sticky_responsive_design-730x400.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/04_sticky_responsive_design-1460x800.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/04_sticky_responsive_design-784x430.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/04_sticky_responsive_design-1568x859.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/04_sticky_responsive_design-877x481.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/877;\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">The Verdict<\/h3>\n\n\n\n<p><strong>Ultimately, whether to use a sticky header depends on your site&#8217;s goals and your audience&#8217;s needs<\/strong>. We recommend testing its impact using analytics tools.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.dreamhost.com\/blog\/a-b-testing\/\" target=\"_blank\" rel=\"noopener\">A\/B testing<\/a> can also provide valuable insights into how a sticky header affects user behavior and conversion rates on your site.<\/p>\n\n\n\n<h2 id=\"h2_conclusion\" class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>We&#8217;ve explored three straightforward ways to add a sticky header to your WordPress site:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Using a plugin: <\/strong>Ideal for beginners seeking a quick, no-code solution.<\/li>\n\n\n\n<li><strong>Using theme settings: <\/strong>Leverages built-in options for seamless integration.<\/li>\n\n\n\n<li><strong>With custom CSS: <\/strong>Offers maximum customization for those comfortable with coding.<\/li>\n<\/ul>\n\n\n\n<p>A sticky header can significantly enhance the user experience by improving navigation and keeping important elements accessible. For small business owners, this can translate into higher engagement and increased conversions.<\/p>\n\n\n\n<p>Now that you&#8217;re equipped with the know-how to add a sticky header, it&#8217;s time to put it into action! Choose the method that suits you best and enhance your website&#8217;s navigability today.<\/p>\n\n\n\n<p>Ready to take your website beyond the basics? Explore our additional resources and continue your journey toward a more effective and engaging online presence.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Additional Resources for Website Enhancement<\/h3>\n\n\n\n<p><strong>Beginner guides:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/learn-wordpress\/\" rel=\"noopener\">Learn WordPress, Fast: 25 Resources To Get You Started<\/a><\/li>\n\n\n\n<li><a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/build-lead-generating-landing-pages-wordpress\/\" rel=\"noopener\">How To Build Lead-Generating WordPress Landing Pages<\/a><\/li>\n\n\n\n<li><a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-posts\/\" rel=\"noopener\">WordPress Posts: Here\u2019s Everything You Need to Know<\/a><\/li>\n\n\n\n<li><a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/time-for-website-redesign\/\" rel=\"noopener\">Your Website Redesign Checklist for an Incredible Revamp<\/a><\/li>\n<\/ul>\n\n\n\n<p><strong>Tutorials:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/change-wordpress-login-url\/\" rel=\"noopener\">How To Find Your WordPress Login URL &amp; Upgrade It for Security<\/a><\/li>\n\n\n\n<li><a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/wordpress-block-patterns\/\" rel=\"noopener\">Decoding WordPress: Working With Block Patterns<\/a><\/li>\n\n\n\n<li><a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/customer-journey\/\" rel=\"noopener\">Your Key to Building a Winning Customer Journey Map<\/a><\/li>\n\n\n\n<li><a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/what-to-do-when-locked-out-wordpress\/\" rel=\"noopener\">What To Do When You\u2019re Locked Out Of WordPress Admin<\/a><\/li>\n\n\n\n<li><a target=\"_blank\" href=\"https:\/\/www.dreamhost.com\/blog\/how-to-do-keyword-research\/\" rel=\"noopener\">Keyword Research: How To Reach More Customers With SEO<\/a><\/li>\n<\/ul>\n\n\n\n<p>At DreamHost, we&#8217;re dedicated to empowering small business owners and website managers with the tools and knowledge they need to succeed online. From hosting solutions to expert tutorials, we&#8217;re here to support your journey every step of the way!<\/p>\n\n\n\n\n<div class=\"article-cta-shared article-cta-small article-cta--product\">\n\t<div class=\"tr-img-wrap-outer jsLoading\"><img decoding=\"async\" class=\"js-img-lazy \" src=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/lazy-loading-transparent.webp\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/03\/product-cta-shared-hosting-877x586.webp 1x, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/03\/product-cta-shared-hosting.webp 2x\"  \/><\/div>\n\n\t<a href='https:\/\/www.dreamhost.com\/hosting\/' class='link-top' target='_blank' rel='noopener noreferrer'>\n\t\t<span>Web Hosting<\/span>\n\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 384 512\" width=\"15\"><path d=\"M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"\/><\/svg>\n\t<\/a>\n\n\t<div class=\"content-btm\">\n\t\t<h2 class=\"h2--md\">\n\t\t\tBuild the Website You&#8217;ve Always Wanted\n\t\t<\/h2>\n\t\t<p class=\"p--md\">\n\t\t\tFrom first idea to full launch, get everything you need to succeed online.\n\t\t<\/p>\n\n\t\t        <a\n            href=\"https:\/\/www.dreamhost.com\/hosting\/\"\n                        class=\"btn btn--white-outline btn--sm btn--round\"\n                                    target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            >\n                            See More                    <\/a>\n\n\t<\/div>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><em>This page contains affiliate links. This means we may earn a commission if you purchase services through our link without any extra cost to you.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sticky headers make website visitors stick around. Here are 3 simple ways to add one to your WordPress site \u2014 no coding expertise needed!<\/p>\n","protected":false},"author":1081,"featured_media":60689,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_yoast_wpseo_metadesc":"Sticky headers make website visitors stick around. Here are 3 simple ways to add one to your WordPress site \u2014 no coding expertise needed!","toc_headlines":"[[\"h-why-sticky-headers-take-your-website-up-a-notch\",\"Why Sticky Headers Take Your Website Up a Notch\"],[\"h2_3-simple-ways-to-create-a-fixed-sticky-header-in-wordpress\",\"3 Simple Ways To Create a Fixed (Sticky) Header in WordPress\"],[\"h2_should-you-add-a-sticky-header-the-ongoing-debate\",\"Should You Add a Sticky Header? The Ongoing Debate\"],[\"h2_conclusion\",\"Conclusion\"]]","hide_toc":false,"footnotes":""},"categories":[696],"tags":[],"class_list":["post-60688","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.3 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>3 Simple Ways To Create a Fixed (Sticky) Header in WordPress - DreamHost<\/title>\n<meta name=\"description\" content=\"Sticky headers make website visitors stick around. Here are 3 simple ways to add one to your WordPress site \u2014 no coding expertise needed!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add a Sticky Header to Your WordPress Site in 3 Easy Steps\" \/>\n<meta property=\"og:description\" content=\"Keep visitors engaged and improve navigation with a sticky header. Learn three simple, no-code methods to add one to your WordPress site today.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/\" \/>\n<meta property=\"og:site_name\" content=\"DreamHost Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DreamHost\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-12-20T15:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-27T13:44:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/1220x628_ogimage_adding_a_sticky_header_in_wp.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Alejandro Granata\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Add a Sticky Header to Your WordPress Site in 3 Easy Steps\" \/>\n<meta name=\"twitter:description\" content=\"Keep visitors engaged and improve navigation with a sticky header. Learn three simple, no-code methods to add one to your WordPress site today.\" \/>\n<meta name=\"twitter:creator\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:site\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alejandro Granata\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"3 Simple Ways To Create a Fixed (Sticky) Header in WordPress - DreamHost","description":"Sticky headers make website visitors stick around. Here are 3 simple ways to add one to your WordPress site \u2014 no coding expertise needed!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/","og_locale":"en_US","og_type":"article","og_title":"How to Add a Sticky Header to Your WordPress Site in 3 Easy Steps","og_description":"Keep visitors engaged and improve navigation with a sticky header. Learn three simple, no-code methods to add one to your WordPress site today.","og_url":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/","og_site_name":"DreamHost Blog","article_publisher":"https:\/\/www.facebook.com\/DreamHost\/","article_published_time":"2024-12-20T15:00:00+00:00","article_modified_time":"2025-05-27T13:44:54+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/1220x628_ogimage_adding_a_sticky_header_in_wp.webp","type":"image\/webp"}],"author":"Alejandro Granata","twitter_card":"summary_large_image","twitter_title":"How to Add a Sticky Header to Your WordPress Site in 3 Easy Steps","twitter_description":"Keep visitors engaged and improve navigation with a sticky header. Learn three simple, no-code methods to add one to your WordPress site today.","twitter_creator":"@dreamhost","twitter_site":"@dreamhost","twitter_misc":{"Written by":"Alejandro Granata","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/#article","isPartOf":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/"},"author":{"name":"Alejandro Granata","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/person\/8bfafd9aede4ad5a3bca7f83b60e3f72"},"headline":"3 Simple Ways To Create a Fixed (Sticky) Header in WordPress","datePublished":"2024-12-20T15:00:00+00:00","dateModified":"2025-05-27T13:44:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/"},"wordCount":1798,"publisher":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/#primaryimage"},"thumbnailUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_blog_hero_1460x1095_adding_a_sticky_header_in_wp.webp","articleSection":["WordPress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/","url":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/","name":"3 Simple Ways To Create a Fixed (Sticky) Header in WordPress - DreamHost","isPartOf":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/#primaryimage"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/#primaryimage"},"thumbnailUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_blog_hero_1460x1095_adding_a_sticky_header_in_wp.webp","datePublished":"2024-12-20T15:00:00+00:00","dateModified":"2025-05-27T13:44:54+00:00","description":"Sticky headers make website visitors stick around. Here are 3 simple ways to add one to your WordPress site \u2014 no coding expertise needed!","breadcrumb":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/#primaryimage","url":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_blog_hero_1460x1095_adding_a_sticky_header_in_wp.webp","contentUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/12\/01_blog_hero_1460x1095_adding_a_sticky_header_in_wp.webp","width":1460,"height":1095,"caption":"3 Simple Ways To Create a Fixed (Sticky) Header in WordPress"},{"@type":"BreadcrumbList","@id":"https:\/\/www-dev.dreamhost.com\/blog\/sticky-header\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dhblog.dream.press\/blog\/"},{"@type":"ListItem","position":2,"name":"3 Simple Ways To Create a Fixed (Sticky) Header in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#website","url":"https:\/\/www-dev.dreamhost.com\/blog\/","name":"DreamHost Blog","description":"","publisher":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www-dev.dreamhost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization","name":"DreamHost","url":"https:\/\/www-dev.dreamhost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","contentUrl":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","width":1200,"height":168,"caption":"DreamHost"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DreamHost\/","https:\/\/x.com\/dreamhost","https:\/\/www.instagram.com\/dreamhost\/","https:\/\/www.linkedin.com\/company\/dreamhost\/","https:\/\/www.youtube.com\/user\/dreamhostusa"]},{"@type":"Person","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/person\/8bfafd9aede4ad5a3bca7f83b60e3f72","name":"Alejandro Granata","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/06\/Alejandro-150x150.jpg","url":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/06\/Alejandro-150x150.jpg","contentUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/06\/Alejandro-150x150.jpg","caption":"Alejandro Granata"},"description":"Alex is one of our WordPress specialists at DreamHost. He is responsible for providing technical support, optimization tips, and assisting customers with internal migrations. In his free time, he enjoys cooking, playing videogames, and reading. Follow Alex on LinkedIn: https:\/\/www.linkedin.com\/in\/agranata\/","sameAs":["https:\/\/www.linkedin.com\/in\/agranata\/"],"url":"https:\/\/www-dev.dreamhost.com\/blog\/author\/alejandrogranata\/"}]}},"lang":"en","translations":{"en":60688,"es":60675,"it":68546,"fr":70738,"nl":70760,"ru":72182,"pt":72187,"uk":72233,"pl":72251,"de":73034},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/60688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/users\/1081"}],"replies":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/comments?post=60688"}],"version-history":[{"count":5,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/60688\/revisions"}],"predecessor-version":[{"id":60706,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/60688\/revisions\/60706"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/media\/60689"}],"wp:attachment":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/media?parent=60688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/categories?post=60688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/tags?post=60688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}