Add Popular Post Slider/Image Gallery In Blogger
Animated Preview :
Also See : How to Create Animated GIF Like Previewing Below..
How To Add Popular Post Slider/Image Gallery To Blogger
- Go to Blogger Dashboard
- Click on DropDown Menu and select Template
- Backup your Template before making any changes to your blog
- Now Click on Edit HTML --> Proceed --> Expand Widget Templates
- Press Ctrl + F and search the code shown below
</head>
- Now Paste the Code shown below just before/above it
<style type="text/css">
#gallery{position:relative;margin:0 35px 20px;width:500px;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(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr9blg_RQTrDqOczV_RRAZvqHzscLVyQyclvlTJD-iEkX-tdslNP8IPNGt2XAbVu9dcUWDLvTKqwLy57Sd3IGYLUUYQVqsMk8aYiWIHbpWmZGto4Lx1iFTu5x7xiQhTsKStx78LSwpp3E/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}
</style>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'/>
<script src='http://latest-hacks.googlecode.com/svn/gadgets/popularposts/popular-posts.js' type='text/javascript'/>
<script type='text/javascript'>
//<![CDATA[
stepcarousel.setup({
galleryid: "gallery",
beltclass: "belt",
panelclass: "panel",
autostep: {enable:true, moveby:1, pause:3000},
panelbehavior: {speed:500, wraparound:true, persist:true},
defaultbuttons: {enable: true, moveby: 2, leftnav: ["https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmqvHSDsMm4zf55kWaaKwGMi3QbYBUF0C7LTtcc__u-fQRnlO6HFiuDygeFDhxpKLoPjN3FYuWzP1ZKYCmFPkS-Zy_DXk-9afFWj3d0v3y8KynPCnjX9auPjRcgkDm_fGfUUmnNtZJMn0/s1600/prev.png", -40, 36], rightnav: ["https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzr8KH30rS0eVDeUbyZQyFHP2CMt05PjrJFWZeGSHR82Q-_4Pdm99pPDEC-2dsLngNAyL3cGyEAYSTvcRqqNLF7SMW-Z3cQ83705sr3k6uGGTKRm4dm1-uDK8vswqpqUQaubw7iROxcGw/s1600/next.png", 2, 36]},
contenttype: ["external"]
})
//]]>
</script>
- Now Find the code shown below using [ctrl+F]
<b:section class='sidebar' id='sidebar' preferred='yes'>
- Now Paste the Code Shown Below just below/after it
<b:widget id='PopularPosts7' 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 == "false"'>
<b:if cond='data:showSnippets == "false"'>
<a expr:href='data:post.href' expr:title='data:post.title' rel='bookmark'><data:post.title/></a>
<b:else/>
<div class='item-title'>
<a expr:href='data:post.href' expr:title='data:post.title' rel='bookmark'><data:post.title/></a>
</div>
<div class='item-snippet'>
<data:post.snippet/>
</div>
</b:if>
<b:else/>
<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'/>
<b:else/>
<img alt='no image' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY1XQ8-oGn9-JgQOqblAq_XUyk9-FSNrgvATCDurwNcVLRTle4P6pxSk4f-ho6rSjWUKXHu30ak__YGI-fRT36OXXnL9NBqEx6GkH5oDOxke1IwJ4L4i8JZqvzCk_EFQqaN0wC1xFKAoI/s1600/defaultimage.jpg'/>
</b:if>
</a>
</b:if>
</li>
</b:loop>
</ul>
</div></div></b:if>
</b:includable>
</b:widget>
- Now save your template
0 comments:
Post a Comment