How to Make WordPress Sidebar Widgets Sticky
DISCLOSURE: This article may contain affiliate links. Which means we make a commission, at no cost to you, on products and services we recommend that you decide to buy. Read our full disclosure here.
A lot of WordPress websites use a sidebar on the left or right-hand side of their pages.
The content in the sidebar varies from site to site and reflects the goals of the owner. Some sidebars display lots of advertising, while others contain links to products, services or popular content. Many sidebars contain a mix of the two. Often with the important stuff at the top.
The biggest issue with this is ‘disappearing’ widgets. As the reader scrolls down, the content in the sidebar moves up the screen and disappears from view.
And once it’s out of sight, it’s out of mind.
This is where the Fixed Widgets and Sticky Elements plugin comes in; using jQuery, it makes one or more widgets ‘stick’ to the top of the page as the reader scrolls down.
If you use a lot of widgets in your sidebar, you might want to avoid making them all sticky as it could provide a poor user experience. You might prefer to just fix the most important widget, such as the newsletter signup form.
Q2W3 Fixed Widget (Sticky Widget) WordPress plugin
This is probably one of the easiest WordPress plugins to set up.
Download the plugin here and install it in the usual way.
Once installed, navigate to the widget (or widgets) you want to make sticky, and tick the Fixed Widget box in the bottom left-hand corner.
That’s all you have to do.
The widgets you make sticky will now stay at the top of the screen as your readers scroll down the page. It works on mobile too. Once you’ve installed the plugin and set up the sticky widget, be sure to test it on multiple devices to see how it works on your site.
By the way, while this does work with AdSense ads, it’s against the AdSense terms of service to make an ad ‘sticky’.
The snippet below comes from the official Google ad placement policies document:
“To ensure a safe and positive user experience, we restrict the use of ad implementations on desktop that cause the ad to appear in a “sticky” or “floating” position on the page as the user scrolls or navigates through the page. While we allow Google anchor ads on mobile web, please note that publisher-created mobile implementations are not permitted as we cannot ensure that they have the same quality protections that we’ve built into our product.”
So, while you can’t place an AdSense ad in a sticky widget, you can place ads from other networks and affiliate programs. Check the policies of each provider to make sure you’re operating within their terms of service.
Hey, I build websites for small businesses in the UK. I also run a few websites of my own, including WordPress Made Easy, which is aimed at beginners and newbies.