Thursday, December 15, 2022
HomeBusinessThe Sticky Floating Navigation Menu in WordPress

The Sticky Floating Navigation Menu in WordPress

Make it rain

A sticky floating navigation menu remains on height of the display screen as a person scrolls down the web page. Some WordPress subject matters have this option inbuilt, as an choice of their settings.

But when your theme doesn’t have this cool characteristic, don’t agonize, there’s a workaround.

You will have the choice of placing just a little coding into your website that can stay the menu stationed on the height of the window, in your customers to get to always.

Why & when a sticky floating navigation menu is useful

Normally, the principle navigation menu sits on the height of the website and accommodates hyperlinks to the principle — if no longer all — pages of your website. A sticky floating navigation menu makes the ones hyperlinks out there always, which saves folks from having to scroll all of the as far back as the highest to get entry to some other segment of the website.

Having a sticky menu has been confirmed to extend conversions. Making it rain, because it had been.

In case you occur to have a web based retailer, then your height navigation menu can have hyperlinks to the product classes, cart, and the product seek characteristic. In case you make the most of a sticky menu, this will likely mean you can decrease cart abandonment and may just feasibly enhance your gross sales! (Once more, making it rain.)

Some paid WordPress subject matters have integrated coding for a sticky floating navigation menu. To test in case your theme has this selection, pass to Issues > Customise to permit it. In case your theme doesn’t have sticky menus inbuilt, then you’ll want to roll up your sleeves and perform a little coding.

Don’t concern even though, it’s no longer too extraordinarily tricky to take on.

Coding your sticky floating navigation menu

Earlier than doing any arduous coding on your prized website, remember to all the time first create a backup of the website and all the time code to your kid theme, no longer your dad or mum theme.

Now, with a view to upload the important code to permit your fancy sticky menu, you’ll be able to pass to Look > Customise to release the WordPress theme customizer. Now click on on Further CSS from the left menu and upload this CSS code:

#site-navigation {




margin:0 auto;

border-bottom:1px cast #ffffff;






text-align: middle;


This may create a navigation menu with a black background. If you wish to have a definite colour, exchange the quantity subsequent to background, like #fefefe, as an example. Additionally, remember to change the #site-navigation with the CSS ID of your present navigation menu and choose the Post button on the height of the display screen.

Be aware: You’ll be able to in finding the CSS ID via opening up the inspector window for your favourite browser. Refresh your website and spot what coolness you may have created. This coding is however one instance. There are a wide variety of customizations you’ll be able to get a hold of. Design on your center’s content material.

“That is advantageous and dandy, however my menu generally is displayed beneath the website header as a substitute of above it.”

If that’s the case, this new CSS code may just overlap the website name and header or display up too on the subject of it earlier than the person scrolls. Easy repair! You merely have so as to add a margin on your header house the usage of some further CSS code:

.site-brand {

margin-top:60px !vital;


Substitute site-brand with the CSS magnificence of your header house. Now, the sticky navigation menu gained’t intrude together with your header earlier than the person scrolls down.

Remaining ideas

Coding may also be a laugh, however all the time keep in mind to edit your kid theme, no longer the dad or mum theme. (As discussed above.) And again up your website! Differently, if you happen to ruin all of the issues, it’s good to be out of good fortune, and when your theme will get an replace, your whole coding might be washed away just like the sands of time.


Most Popular

Recent Comments