B logger is still a popular site and choices for the new blogger who starts their blog without any investment. Although it does not consist of all those features which a paid blogging site like WordPress given. Even though we can do any customization in our blog as a WordPress blog just by editing the HTML code of our blog.
Recently, I was trying to make subscribe/newsletter widget sticky to get some subscribers to my blog by attracting them to the floating newsletter widget and after playing with codes and searching a lot for the solution, finally, I implemented it on my blog and it works as per my expectation.
As you can see the Subscription widget in the sidebar is now sticky and it floats in the sidebar incomplete posts.
In this article, I am going to show you how to make a widget sticky in the blogger(blog spots) as well as Wordpress sidebar. Make a sticky widget in blogger is an easy process. So let’s start with easy tricks to make a widget sticky in the blogger sidebar.
Benefits of making a sidebar widget sticky
Here are some of the advantages of making a sidebar widget sticky in blogger/WordPress -1. Visible to the visitor throughout and thus attract visitor towards it.
2. Gets more impressions
3. It will attract more clicks
4. Page Views can be increased and much more
5. Your sales/conversion can be increased
6. You can increase your subscribers and many more...
How to make a widget sticky in the blogger(Blogspot)?
Here are some of the easy methods to make a widget sticky in the blogger sidebar-Step:#1» Open your blogger dashboard and click on the theme than on the dropdown menu in the right corner of your screen then select edit HTML.
Step:#2» Click anywhere in the code area and press Ctrl and F from your keyboard, a search box appear then search there for a </bogy> tag
One thing you should note here is, if your blog already has the ajax.googleapis.com then don’t paste the below first line else it won’t work.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script> <script type='text/javascript'> //<![CDATA[ $(function() { if ($('#widgetID').length) { var el = $('#widgetID'); var stickyTop = $('#widgetID').offset().top; var stickyHeight = $('#widgetID').height(); $(window).scroll(function() { var limit = $('#footerID').offset().top - stickyHeight - 20; var windowTop = $(window).scrollTop(); if (stickyTop < windowTop) { el.css({ position: 'fixed', top: 20 }); } else {el.css('position', 'static'); } if (limit < windowTop) { var diff = limit - windowTop; el.css({top: diff }); } }); } }); //]]> </script>
Step:#4» Now save the template and see if the widget becomes floating or not. Check it on both the computer and mobile views.
If you are using a responsive template then this floating widget may create a problem in the mobile view so to fix it you need to add some code to hide the floating widget from the mobile view.
#widget Id{width:100%; max-width:320px } @media only screen and (min-width:260px) and (max-width:989px){ #widget Id{display: none!important;}}
Step:#6» Hit on the save button and save your template.
You are good to go. Check your blog and the widget you have made sticky will be showing even when you will scroll to the bottom.
This was all about how to make a widget sticky in the blogger sidebar. This is the easiest way to make sidebar widget sticky in a blogger.
How to make a widget sticky in the WordPress sidebar?
The first thing you need to do is to install and activate the Q2W3 Fixed Widget (Sticky Widget) plugin. After activating the plugin, go to Appearance » Widgets and click on the widget that you want to make sticky.If you are looking for some more leads or need more impressions on some particular ads or any widget in your blogger blog, you can use this simple method to make a widget sticky in blogger.
Also, it is advisable to not make Google AdSense ads sticky as it is against AdSense policy. But you can make your affiliate banners sticky to get more views, clicks, and sales.
We hope that this article helped you implement a sticky floating sidebar widget in your Blogger as well as WordPress website.
Write in a comment box if you face any problem in implanting it on your site and don't forget to share it with you friends.
11 Comments
It works! But... unfortunately it scroll down into the footer.
ReplyDeleteHow to make it stop right before the footer of the page?
Sorry for inconvenience, now i have made changes in the code. you have to replace the previous one with current code. If you face any problem please feel free to ask.
DeleteThanks Ashish for your fast response. I really appreciated.
DeleteUnfortunately it wasn't work with the recent code.
So, I used the past code again.
FYI, I used amp template for my blog.
regards.
Richard Daris
Ya, It may not working due to AMP template. But one thing I want to tell you that the template you use is not a valid AMP. You can check the validity of your AMP page by going to this site. https://search.google.com/test/amp
Deletesome AMP valid blog:-
https://amprandom.blogspot.com/
Yes, I know. The invalid amp template that I use, precisely because of the use of 3 javascript, one for advertising and 2 of them are precisely due to the use of javascript for this sticky. But because I need it, then I still use the third javascript. Overall, thanks Ashish.
DeleteWelcome Richard
ReplyDeletenice
ReplyDeleteWelcome
DeleteCan you please help? It is not working. It is 6th or 7th solution I've tried, some a few times and none of them are working and the authors are not replying. I am not a coder and it is my 4th day trying to figure out this ONE thing. It's a very simple blog and I am really set on the sticky sidebar as I think it's less confusing for readers when it stays in place. Please... Please reply. Thank you. Here is my blog: https://wierszowe.blogspot.com/
ReplyDeleteWhat else do you need to help me? Thank you. JW
Well this is working perfectly...in which step you find difficulty??
DeleteI guess you template is not supported better to use mordern template or the template whic have inbuilt sticky sidebar
DeleteAny Comment having the intention of spamming will not publish nor any irrelevant advertisment link will allow in the comment. Thanks!