• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » WordPress Sticky Floating Widget or Menu Without Plugin

By Abhishek Ghosh April 1, 2016 12:56 pm Updated on April 1, 2016

WordPress Sticky Floating Widget or Menu Without Plugin

Advertisement

It is quite funny, but factually many a times we can do far better, more customized works without any plugin. WordPress Sticky Floating Widget or Menu Without Plugin is Possible to Deploy via jQuery or CSS. We Can Logically Use that for Post Pages. Q2W3 Fixed Widget is a well known WordPress Plugin which is easy if you fear minimal coding. We will give an approximate example, you need to customize it for your own design.

 

Why We Need WordPress Sticky Floating Widget or Menu Without Plugin?

 

Sidebar is a crucial aspect for a professional look. When the reader scrolls down a longer post page, the sidebar ends and that space remains empty. None can write similar sized posts. Websites with wordPress sticky floating widget or menu, one sidebar widget will stick and float along with the scrolling down of the longer post page. This is useful for you to get more attention to one of your sidebar widget. 5 years ago, we wrote what to put on a sidebar, that is not exactly the topic we are discussing in this guide. You may read later.

It does not need explanation – using more plugins is more bad.

Advertisement

---

WordPress Sticky Floating Widget or Menu Without Plugin

 

WordPress Sticky Floating Widget or Menu Without Plugin : Via CSS or JS

 

We can inject an inline CSS or Js with Header and Footer plugin or Genesis Plugin for Genesis Theme Framework. The working principle is same as we used in Drop Caps without Plugin. jQuery loads in normal WordPress front-end. So, it is just easy to use jQuery plugin. Hartley wrote a great way, which you may read for full technical details :

Vim
1
https://blog.hartleybrody.com/creating-sticky-sidebar-widgets-that-scrolls-with-you/

What he did is an easy trick, if you wrap with catcher and sticky div class,

Vim
1
2
3
4
5
6
7
<div id="catcher">
    <!--stuffs here-->
</div>
<div id="sticky">
    <!--more stuffs here-->
</div>

and add this jQuery written by him (and customize after reading his detailed guide), it is just easy :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<script>
$(document).ready(function() {
        function isScrolledTo(elem) {
            var docViewTop = $(window).scrollTop(); //num of pixels hidden above current screen
            var docViewBottom = docViewTop + $(window).height();
            var elemTop = $(elem).offset().top; //num of pixels above the elem
            var elemBottom = elemTop + $(elem).height();
            return ((elemTop <= docViewTop));
        }
        var catcher = $('#catcher');
        var sticky = $('#sticky');
        $(window).scroll(function() {
            if(isScrolledTo(sticky)) {
                sticky.css('position','fixed');
                sticky.css('top','0px');
            }
            var stopHeight = catcher.offset().top + catcher.height();
            if ( stopHeight > sticky.offset().top) {
                sticky.css('position','absolute');
                sticky.css('top',stopHeight);
            }
        });
    });
</script>

WP Enqueue Script can be used to inject the javascript and put it to footer.

Funnily, it is more easier with CSS. With CSS position:fixed, we can easily active the same result in more easy way. If you wrap a div with :

Vim
1
2
3
<div id="sticky">
    <!-- stuffs here-->
</div>

and adjust the parameters, you can easily get that fun :

Vim
1
.sticky { position: fixed; top: 30px; width: 292px; }

Tagged With how to fix widget in WordPress without plugin , sticky sidebar without plugin wordpress , sticky widget without plugin , wordpress sticky menu on scroll without plugin 2018 , wordpress sticky posts without a plugin

This Article Has Been Shared 767 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to WordPress Sticky Floating Widget or Menu Without Plugin

  • 5 SEO plugins for WordPress

    Here are five popular SEO plugins for Wordpress which can help your blog running better.

  • Dublin core, Google and SEO

    What is Dublin core? Does Google reads Dublin core? Has Dublin core any effect on SEO? Many questions are answered about Dublin core through the knowledge gathered throughout the Internet.

  • Newsletter Plugins for WordPress and Newsletter Delivery Options

    Newsletter Plugins for WordPress are needed for Professional, Bussiness and Personal WordPress based websites or Blogs. Along with the Newsletter Plugins for WordPress, we will discuss about the Newsletter Delivery Options.

  • WordPress FTP Full Backup : Backup FTP to ZIP File

    WordPress FTP Full Backup is a WordPress Plugin to backup your WordPress FTP using PHP ZipArchive to a ZIP file, save it on server and gives option to download.

  • WP Super Cache With Rackspace Cloud Files CDN (Open Cloud)

    WP Super Cache With Rackspace Cloud Files CDN guide is an update due to change of technology by using Open Cloud.The Streaming Media need to be used separately.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • What is ChatGPT? February 3, 2023
  • Zebronics Pixaplay 16 : Entry Level Movie Projector Review February 2, 2023
  • What is Voice User Interface (VUI) January 31, 2023
  • Proxy Server: Design Pattern in Programming January 30, 2023
  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023

About This Article

Cite this article as: Abhishek Ghosh, "WordPress Sticky Floating Widget or Menu Without Plugin," in The Customize Windows, April 1, 2016, February 5, 2023, https://thecustomizewindows.com/2016/04/wordpress-sticky-floating-widget-or-menu-without-plugin/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT