--> Show Random Headlines Inside Sticky Floating Bar | Experience Lab - Online business creation and development guide for bloggers and startups

Show Random Headlines Inside Sticky Floating Bar

Ever wondered to create a Sticky Floating Bar to show Random headlines on your blog? We recently developed a small plugin in wordpress w...

Floating sticky Bars
Ever wondered to create a Sticky Floating Bar to show Random headlines on your blog? We recently developed a small plugin in wordpress which we have implemented on our third blog hosted on wordpress and also on BlogSpot blogs of our existing clients. We introduced several versions of sticky bars for blogger blogs in 2012 but this one adds an extra functionality. It will show a random post on each page refresh! It uses Feedburner JavaScript snippet to fetch recent headlines from your Feeds and then displays a title randomly when user refreshes the webpage or navigates between pages. Also contains a toggle button to show and hide the headlines. You can customize it easily and change its location to top of page or at footer. Works best with fluid and responsive designs. The analytics for our newly launched blog has shown an amazing 30% increase in Pageviews just after we installed this plugin. I have developed both static and dynamic versions of it for both Blogger and Wordpress Genesis Framework.
Today's tutorial will guide you in installing this amazing plugin on your blogger blogs to multiply every unique visit. Lets get to work then!
 

Activate Recent Headlines on Feedburner?

Note: For Dynamic version only. If you wish to add a static/manual version of this plugin then skip this step.
For the dynamic version of this plugin you will need to have Feeds stored at feedburner.
  1. Go To Feedburner > Publicize > BuzzBoost
  2. Uncheck all the boxes. Keep number of items 15 or you can choose All to select all posts have your published so far. Make links open in same window.
  3. Click Save to activate the List of your recent posts.

buzzboost settings
   4. Feedburner will give you a JavaScript code that you will need to copy. Only copy the code starting with <script> and ending with </script> as shown below:
feedburner javascript snippet
  Save this code inside a notepad because we will need to use it later in this tutorial.

Show Random Headlines in blogger  - Dynamic

We managed to write a script with the help of CSSGlobe script which helps you to display content randomly and rotate content using Javasctipt and CSS. We modified it to generate a dynamic list instead of manual list through Feedbuner BuzzBoost Headlines. I guess instead of adding a manual list a random dynamically generated list would be much more useful. :)
You can add the sticky bar at your blog footer and also at the top of your blog. I will guide you with both the settings. Follow these simple tips:
  1. Go to Blogger > Template
  2. Backup your template
  3. Click Edit HTML
  4. Search for </head> and just above it paste this:
<script type='text/javascript'>
//<![CDATA[
this.randomizer = function(){
    var length = $(".feedburnerFeedBlock li").length; // this is where we put the id of the list
    var ran = Math.floor(Math.random()*length) + 1;
    $(".feedburnerFeedBlock li:nth-child(" + ran + ")").show();
};
$(document).ready(function(){  
    randomizer();
});

$(document).ready(function() {
$('#toggleButton').click(function() {
if ($('#MBT-Sticky-container').is(':visible')) {
$(this).val('▼');
} else {
$(this).val('▲');
}
$('#MBT-Sticky-container').slideToggle();
});
});
//]]>
</script>

 

5.  Optional: Skip this step if you have Jquery source link already added inside your template.
Next search for <head> and just below it paste the following JQuery library code.

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js?ver=1.7.2' type='text/javascript'/>

  

6. Search for </b:skin>.  Click the black arrow to expand the code.
compressed blogger stylesheet
   7.  Paste the following CSS Styles just above ]]></b:skin>

/*--------Floating Sticky bar by www.MyBloggerTricks.com --------------*/
#creditfooter{display:none;}
#MBT-Sticky-container {
   height: 55px;
background: #000;
border-top: 5px dashed #FC8D59;
border-bottom: 2px solid #FFFFFF;
position: fixed;
width: 100%;
z-index: 99999;
box-shadow: 1px 2px 9px #666;
top:0px; }
.feedburnerFeedBlock ul, .feedburnerFeedBlock ul li{
    margin:0;
    padding:0;
    list-style:none;
    }
   
    .feedburnerFeedBlock ul li a { color:#fff!important; text-decoration:none;}
        .feedburnerFeedBlock ul li a:hover {text-decoration:underline;}
.feedburnerFeedBlock ul{
    line-height:120%;
   
    }
.feedburnerFeedBlock ul li{
    padding:20px; text-align:center; font-family:georgia; font-size:17px; font-weight:bold;
   
    display:none; /* hide the items at first only to display one with javascript */
    }
#toggleButton {
position: fixed;
top: 19px;
right: 10px;
z-index: 999999999999;
border-radius: 100px;
padding: 5px 6px;
font-size: 10px;
border-width: 3px;
border: 3px solid #FC8D59;
background: #000;
color: #FFF;
cursor: pointer;
}
.sticky-gap {
height: 80px; clear:both;
}

Customization:
[a] Change Colors
  • To edit the border colors of the toggle button and container edit: #FC8D59
[b] Change Location/Position
By Default the sticky bar displays at the top of webpage but if you wish to show rotating random headlines at your website footer then make these changes:
  • Replace top:0px; with bottom:0px;
  • Replace top:19px; with bottom:19px;
[c] To increase or decrease the vertical gap between your content and the sticky bar edit  height: 80px;

8. Now finally search for the body tag which is <body>
Note: If you are using Official Blogger Templates then search for this tag instead:
<body expr:class='&quot;loading&quot; + data:blog.mobileClass'>

After you have found the proper body tag simply paste the following code below it:

<input id='toggleButton' type='button' value='▲'/>
<div id='MBT-Sticky-container'>
<script src='http://feeds.feedburner.com/TntByStc?format=sigpro' type='text/javascript'></script>
    </div><div class="sticky-gap"></div>

Replace the above bolded JavaScript code with the BuzzBoost code you copied in this step.
  9.  Save your template and you are all done!
Visit your blog to see an attractive attention grabber working just perfectly! :)

Show Random Headlines in Blogger - Manual

If you wish to display a selected list set of links then you can surely create your own list by making these simple changes.


1. Change the CSS Code:
Inside the CSS code shared above in step#7  replace all .feedburnerFeedBlock ul   with .feedburnerFeedBlock1


2. Change the HTML code
Instead of using the HTML code shared in step#8 kindly use the following one:

<input id='toggleButton' type='button' value='▲'/>
<div id='MBT-Sticky-container'>
<ul class='feedburnerFeedBlock1'>
  <li><a href='ADD URL HERE'>ADD TEXT 1 HERE</a></li>
<li><a href='ADD URL HERE'>ADD TEXT 2 HERE</a></li>
<li><a href='ADD URL HERE'>ADD TEXT 3 HERE</a></li>
<li><a href='ADD URL HERE'>ADD TEXT 4 HERE</a></li>
  
  </ul>
    </div><div class="sticky-gap"></div>

 

The above code will help you create 4 headlines. You can edit the text and URL address for each link. To create a new headline simply keep on adding the following line:

<li><a href='ADD URL HERE'>ADD TEXT  HERE</a></li>
That's it!

Need Help?

We will keep on updating this plugin and will add several new features to it. You can surely customize it and add anything inside the container like social sharing buttons for instance. In our next post we will share how to add this sticky bar to Genesis Framework. Till then let me know if you need any help. Would be a pleasure helping you out.
If you are looking for the stickybar we are using on MBT then read:
I just hope this new plugin adds a new life to your blog and also your advertising revenue because the extra pageviews mean cash! Peace and blessings buddies. :)

COMMENTS

Name

Affiliate Marketing,12,Announcement,34,Bing,9,Bitcoin,38,blog,7,Blogger Resources,42,Blogger Templates,4,blogger tricks,156,Blogging ethics,70,Blogging tips,198,Bugs and Errors,34,Business,9,Copyright Violation,9,CSS and HTMLTricks,95,Designs,8,drop down menu,7,eBook,12,Email Marketing,7,Events,30,Facebook,30,Facebook tricks,49,Google,157,Google AdSense,42,Google Analytics,7,Google Plus,51,Google Plus Tricks,38,Guest Posts,112,home,2,How To,77,Internet,1,JSON Feeds,25,Kitchen Recipes,2,Label Based Sitemap Themes,1,Make Money Online,108,Marketing,16,MBT Blogger Templates,7,Menus,1,News,146,Pages,1,Posts,10,presentations,15,Responsive,10,Reviews,7,SEO,307,Settings,6,Shortcode,15,Sitemap Themes,1,Social Media,155,Technology,7,Templates,1,Tips,2,Tools,1,Traffic Tips,80,Video,19,Web Designing,62,web hosting,18,Webmaster Tools,97,Widgets,199,wordpress,26,
ltr
item
Experience Lab - Online business creation and development guide for bloggers and startups: Show Random Headlines Inside Sticky Floating Bar
Show Random Headlines Inside Sticky Floating Bar
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNzLShYObwPS-D44oKLbqvVOxRXrKra1Lqa-Y2nKEKxStIQmMEAxY0bTWAVp5khgXBwGs_0naN_z8cRNyUVmhXtAxBxAyf9yGxPWFtP1IYANa3687jfQPB1Y_C0ZkDRbMEMI4J4Sf4KW4/?imgmax=800
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNzLShYObwPS-D44oKLbqvVOxRXrKra1Lqa-Y2nKEKxStIQmMEAxY0bTWAVp5khgXBwGs_0naN_z8cRNyUVmhXtAxBxAyf9yGxPWFtP1IYANa3687jfQPB1Y_C0ZkDRbMEMI4J4Sf4KW4/s72-c/?imgmax=800
Experience Lab - Online business creation and development guide for bloggers and startups
https://www.experiencelab.info/2013/07/show-random-headlines-inside-sticky.html
https://www.experiencelab.info/
https://www.experiencelab.info/
https://www.experiencelab.info/2013/07/show-random-headlines-inside-sticky.html
true
2959477579779989044
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share. STEP 2: Click the link you shared to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy