Follow On Google News

Make WordPress right Sidebar sticky without plugin

We are going to show you how to make the last widget of the right sidebar or the entire sidebar sticky or scrollable in the GeneratePress theme ....

If you have create WordPress site, and are using GeneratePress theme or other in it, then you would like its right sidebar sticky or scrollable. So in this article, we are going to show you how to make the last widget of the right sidebar or the entire sidebar sticky or scrollable in the GeneratePress theme or other in a very easy way without using any plugin.

Since the sidebar is one of the essential parts of a blog website. Using different widgets in the sidebar makes your website attractive and sidebar also helps in increasing the click through rate (CTR) of your website, as it incorporates attractive features of the website.

WordPress right Sidebar sticky without plugin

Floating or sticky widgets are used for many purposes in WordPress. If you have long blog posts, without the sticky widget in PC or Desktop, your right sidebar will be blank while scrolling through the post. So it is better to have sticky or floating widgets. As Sticky Widget is used on the Site for the following purposes:

  • To show popular posts.
  • To display selected posts.
  • To embed a chat box.
  • To install the Subscriber Widget.
  • To show recent posts.
  • To put social sharing buttons.
  • to place advertisements.
  • Any other features.

Here we are telling to make the last widget of the right sidebar or the entire sidebar sticky in the GeneratePress theme. You can scroll down this blog post and see Sticky right sidebar. Two methods are often used to make widgets sticky in a GeneratePress theme or any theme.

  • Making the Sidebar Sticky Using the Plugin.
  • Making the sidebar sticky without a plugin.

Make the right sidebar sticky in the WordPress theme without any plugins

Without a plugin, using CSS code in GeneratePress or other, it is very easy to make the last widget sticky or the entire sidebar sticky. This is a good approach because using a little CSS code is better than giving a load of plugins to the site.

Here are two different CSS codes, use any one you want. Note that the code is for the blog that has the right sidebar and if you are using it for the left sidebar then do adjust and customize the code.

First type of CSS code:

@media (min-width: 769px) {.site-content {  display: flex;}.inside-right-sidebar {  height: 100%;}.inside-right-sidebar aside:last-child {	position: -webkit-sticky;	position: sticky;	top: 1px; /*Adjust position */}}

Another type of CSS code:

#right-sidebar .inside-right-sidebar {    position: sticky;    top: 0;}

How to use, it is described below:

Go to Appearance > Customize > Additional CSS

Since there will appear to be some code already there you don’t have to do anything. Simply copy the CSS code given here and paste it below in the Additional CSS section. If necessary, adjust the given code as per your wish. Then publish it by pressing the publish button.


So which of these two codes have you tried, do tell it by commenting below. In the end, we hope you were able to do so by reading and understanding this entire article on How to Make Ultimate Widget Sticky in GeneratePress Theme.

Able People Encourage Us By Donating : सामर्थ्यवान व्यक्ति हमें दान देकर उत्साहित करें।

Thanks for reading: Make WordPress right Sidebar sticky without plugin, Please, share this article. If this article helped you, then you must write your feedback in the comment box.

Getting Info...

Post a Comment

Comment your feedback on this article!

Recently Published

10+ Foods To Improve Your Vision

आँखों की कमजोरी या कमज़ोरी के लक्षण कई लोगों को होने वाली सबसे आम दृष्टि समस्याएं हैं आंखों में दर्द, आंखों में पानी आना, पढ़ते समय आंखों में पानी आ…
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.