Tuesday, September 4, 2012

Add A Auto Slider Gallery Just Above Your Blogger Blog Posts

Author: Gagan Masoun
Auto Slider Gallery Just Above Your Blogger Blog Posts
After published "Slide Out Social Bookmarking Gadget With JQuery" and "Slide Out Floating Sharing Buttons For Blogger Blog",now, I will show you "How to Add A Auto Slider (Popular Posts) Gallery Just Above Your Blogger Blog Posts.It's a very effective way to increase the blog usability and engage the readers.

This widget shows the most popular 10 posts with auto slider on your blog just above your Blogger posts. You can see the image below as a Demo:

Read Also: Blogger Dynamic View For Mobile Device

Add A Auto Slider Gallery Just Above Your Blogger Blog Posts
Before adding this widget I want to tell you that it is not fully compatible with all blogger templates, so I suggest you make a backup before making any changes to your blogger template.let's start the tutorial now:

For Old Blogger Interface:

  • Go to Dashboard - Design - Edit HTML - (Make a Backup) > Expand Widget Template

For New Blogger Interface:

  • Go to Dashboard - Template - Edit HTML - Proceed - (Make a Backup) > Expand Widget Template
  • Now, Press (CTRL + F) & Search Given Code
  • Just Above/Before It, Add The Following Code
#gallery{position:relative;margin:0 35px 20px;width:590px;height:126px;background:#ffffff}
#gallery .belt{position:absolute;top:0;left:0;list-style-type:none}
#gallery .panel{float:left;margin:20px;width:84px;height:86px;background:url(http://2.bp.blogspot.com/-_Srvna_zg0M/T393_LXqDLI/AAAAAAAABrQ/_t2GmPexCHo/s1600/bg-slider.png) bottom center no-repeat;overflow:hidden}
#gallery .panel img{float:left;border:1px solid #DDD;margin:5px;width:72px;height:72px;background:#FFF;padding:0px}
#gallery .panel img:hover{filter:alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity:0.5;opacity:0.5}
Remember Notes: You can adjust the size of gallery, changing the values in Yellow (590 and 126). 
  • Now Search Following Code
  • Just Above/Before It, Add Below Code
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js' type='text/javascript'/>
<script src='http://blogsdaddy.googlecode.com/files/auto-slider.js' type='text/javascript'/>
<script type='text/javascript'>
galleryid: "gallery",
beltclass: "belt",
panelclass: "panel",
autostep: {enable:true, moveby:1, pause:6000},
panelbehavior: {speed:500, wraparound:true, persist:true},
defaultbuttons: {enable: true, moveby: 2, leftnav: ["http://2.bp.blogspot.com/-0Iss3Wjr36Q/T393U65TcKI/AAAAAAAABq4/K_uzwyuNzrE/s1600/prev.png", -40, 36], rightnav: ["http://1.bp.blogspot.com/-DtspeRHclnQ/T393WdyB8EI/AAAAAAAABrA/TKHickb2iI8/s1600/next.png", 2, 36]},
contenttype: ["external"]
  • In Your Template, Search Below Code
<b:section class='main' id='main' showaddelement='yes'>
  • If you can't find it then search this 
<b:section class='main' id='main' showaddelement='no'>
<b:section class='content' id='content' showaddelement='no'> 
  • Just Below/After It, Add The Following Piece Of Code
<b:widget id='PopularPosts2' locked='false' title='Popular Posts' type='PopularPosts'>
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<div style='margin-top:20px;margin-bottom:70px;margin-left:-20px;'>
  <div id='gallery'>
   <ul class='belt'>
    <b:loop values='data:posts' var='post'>
     <li class='panel'>
      <b:if cond='data:showThumbnails == &quot;false&quot;'>
       <b:if cond='data:showSnippets == &quot;false&quot;'>
        <a expr:href='data:post.href' expr:title='data:post.title' rel='bookmark'><data:post.title/></a>
        <div class='item-title'>
         <a expr:href='data:post.href' expr:title='data:post.title' rel='bookmark'><data:post.title/></a>
        <div class='item-snippet'>
       <a expr:href='data:post.href' expr:title='data:post.title' rel='bookmark'>
        <b:if cond='data:post.thumbnail'>
         <img expr:alt='data:post.title' expr:src='data:post.thumbnail'/>
         <img alt='no image' src='http://2.bp.blogspot.com/-mRxY2oEkLJc/T393wpt0z_I/AAAAAAAABrI/4blMjDaSOUY/s1600/no-image.PNG'/>
  • It's All Done, Save Your Template and Visit It. 
  • This Widget Will Not Show On Your Posts/Pages.If You Want to Display Then Remove The Fragments Of Code In Yellow.
If you need my help then just leave your comment below.Stay blessed... Happy Blogging :)

AuthorAuthor - Gagan Masoun is the owner of Blogs Daddy Blog.Gagan lives in India, has been blogging since 2010 and writing Blogs Daddy Blog since 2011.You can find him in the usual social networks.


  1. I've tried, everything seems successful
    Thank you very much for your tips and code.