How to Create Last Widget Sticky in GeneratePress Theme?

In this tutorial, we are going to create last widget sticky in GeneratePress Theme using the plugin and without the plugin.

Sidebar is one of the essential parts of the blog. Using different widgets in the sidebar can make your website engaging. Sidebar helps to increase the Click Through Rate (CTR) of the website.

Here we are going to learn to create last widget sticky like in my WordPress blog. You can scroll down this blog post and check the right sidebar.

We are going to use two methods to make widget sticky in GeneratePress Theme.

  1. Creating last widget Sticky Using Plugin.
  2. Creating last widget Sticky Without Plugin.
How to Create Last Widget Sticky in GeneratePress Theme

In WordPress, we can use a floating or Sticky widget in many ways. If you have longer blog posts then without a sticky widget your right sidebar will be blank while scrolling the post. so it’s better to have the floating widget.

Moreover, you can use the sticky widget on your site for the following purposes.

  • Show Popular Posts.
  • Display Featured Posts.
  • Embed Chat Box.
  • Embed Subscriber Widget.
  • Display Affiliate Banner.
  • Show Recent Posts.
  • Social Sharing Icons.
  • Advertisement Box.
  • Coupon Codes.
  • Stick or Float any widgets.

Create Last Widget Sticky in GeneratePress using Plugin

Fixed Widget plugin is a popular and widely used technique to make your sidebar sticky. For this, you need to install the Q2W3 Fixed Widget plugin. You can use the Q2w3 WordPress plugin in other WordPress Themes too.

Let’s install and implement it in GeneratePress Theme.

Fixed Widget Option in Widgets
  • Go to Plugins > Add New
  • Search Q2W3 Fixed Widget Plugin.
  • Install and Activate it.
  • Go to Appearance > Widgets.
  • Go to the Right Sidebar.
  • Choose the last widget and you will see Fixed Widget Option.
  • Check the Fixed Widget Option to create Sticky. (Follow above Screenshot)
  • Hit Save Button.
  • Also, Go to Appearance > Fixed Widget Options
  • Adjust the Widget settings according to your theme needs.
General Options in Q2W3 Fixed Widget

Also Read: Add Google Analytics to GeneratePress Theme

Create Last Widget Sticky in GeneratePress without Plugin

Making Last Widget Sticky is easy in GeneratePress using the CSS code. It is a lightweight approach and a small CSS code work likes a charm.

Let’s make the last widget sticky using CSS code in GeneratePress Theme. Note that the code is for the blog with the right sidebar. Adjust the code if you are using the left sidebar.

Last Widget Sticky Code for GeneratePress Theme
  • Go to Appearance > Customize > Additional CSS.
  • Copy and Paste the CSS code.
  • Adjust the value in top CSS property if required.
  • Hit Publish Button.
@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: 70px; /*Adjust position */

Check Out: Display Related Posts in GeneratePress Theme


so which method are you going to try?

If you are unfamiliar with the code then you can use the Q2W3 Fixed Widget plugin.

Personally, I have used CSS Code in my WPLogout blog as you can check the last widget in the right sidebar.

In the end, I would like to thank you for reading the whole tutorial to create last widget sticky in GeneratePress theme.

Resources used in this post



Quickly access over 100+ popular SEO/Marketing tools to Boost your website traffic.

Thank you for subscribing. Check your Email(Didn't receive? check Spam Folder)

Something went wrong.

I am obsessed with WordPress and write articles about WordPress Speed Optimization, SEO, Blogging. I mostly publish tutorials on GeneratePress and GenerateBlocks.

28 thoughts on “How to Create Last Widget Sticky in GeneratePress Theme?”

  1. I have tried multiple classes and IDs to try and get this to work with the theme I use called Accesspress Store. Are you able to activate it and see if you can give it a shot

    • Hi Viney, I haven’t tried the code for the last 2 widgets but you can look for :nth-last-child selector and adjust the code. Also, there is a plugin option to fulfill your requirement.

  2. I have tried This CSS on My website Buy the last item on widget is not sticky. I have used this css on simple css plugin.  I do not want to use any third party plugin. Thank you

    • Hi Bijay,
      If you are using responsive AdSense code in the widget then it won’t work.
      Please try adding fixed size Ads code, it will work.


Leave a Comment