Related posts widget is a great widget to increase your post-views.You can add related posts just below of the every blog post.It also shows thumbnails to attract the users.This widget was designed by bloggerplugins. I customize this widget and brought to you.If you like this then surely add it on your blog....
How To Add It On Blogger
- Go to Blogger Dashboard > Design > Edit HTML.
- Expand Widget Templates Box.
- Now find </head> using CTRL+F function.
- Paste below code just above/before </head> tag.
<!--BTSNTS Related Script Posts Start-->
<!-- remove --><b:if cond='data:blog.pageType == "item"'>
<style type="text/css">
#related-posts {
float:center;
text-transform:none;
height:100%;
min-height:100%;
padding-top:5px;
padding-left:5px;
}
#related-posts h2{
font-size: 1.6em;
font-weight: bold;
color: black;
font-family: Georgia, “Times New Roman”, Times, serif;
margin-bottom: 0.75em;
margin-top: 0em;
padding-top: 0em;
}
#related-posts a{
color:black;
}
#related-posts a:hover{
color:black;
}
#related-posts a:hover {
background-color:#E0F8E0;
}
</style>
<script type='text/javascript'>
var defaultnoimage="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihGAYhmEcyD_A75WYqeDGIl4NGTVwyF5Iol-Nhk8hEYebEM45D-UnXV3NmHSqXyIhy3rd2m8QufZLxoIngmGJuGaeRL5hD7m4pogoxVcO2n4ChC1j2N-I-Fj2oqSsXhww4CkZRB9Axeys/s400/noimage.png";
var maxresults=5;
var splittercolor="#d4eaf2";
var relatedpoststitle="Related Posts";
</script>
<script src='http://btsnts.googlecode.com/files/btsnts-related-posts01.js' type='text/javascript'/>
<!-- remove --></b:if>
<!--BTSNTS Related Script Posts Ends-->
</head>
Now Find any one of these -
<div class='post-footer-line post-footer-line-1'>
<p class='post-footer-line post-footer-line-1'>
And paste below code just after/below this code....
<!-- Related Posts with Thumbnails Code Start-->
<!-- remove --><b:if cond='data:blog.pageType == "item"'>
<div id='related-posts'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast != "true"'>
</b:if>
<script expr:src='"/feeds/posts/default/-/" data:label.name "?alt=json-in-script&callback=related_results_labels_thumbs&max-results=6"' type='text/javascript'/></b:loop>
<script type='text/javascript'>
removeRelatedDuplicates_thumbs();
printRelatedLabels_thumbs("<data:post.url/>");
</script>
</div><div style='clear:both'/>
<!-- remove --></b:if>
<b:if cond='data:blog.url == data:blog.homepageUrl'><b:if cond='data:post.isFirstPost'>
<a href='http://www.btsnts.blogspot.com/'><img style="border: 0" alt="Related Posts Widget For Blogger with Thumbnails" src="http://image.bloggerplugins.org/blogger-widgets.png" /></a><a href='http://bloggertemplates.bloggerplugins.org/' ><img style="border: 0" alt="Blogger Templates" src="http://image.bloggerplugins.org/blogger-templates.png" /></a>
</b:if></b:if>
<!-- Related Posts with Thumbnails Code End-->
Customization
You can adjust the maximum number of related posts being displayed by editing this line in the code.
var maxresults=5;
You will also have to edit the posts per label(it should ideally be one more that maxresults)
max-results=6
To edit Title of the widget find this line
var relatedpoststitle="Related Posts";
To change the default thumbnail, you can edit this line of code
var defaultnoimage="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihGAYhmEcyD_A75WYqeDGIl4NGTVwyF5Iol-Nhk8hEYebEM45D-UnXV3NmHSqXyIhy3rd2m8QufZLxoIngmGJuGaeRL5hD7m4pogoxVcO2n4ChC1j2N-I-Fj2oqSsXhww4CkZRB9Axeys/s400/noimage.png";
To Change the Colour of the Splitter Line
var splittercolor="#d4eaf2";
Please do comments about this widget.If you are getting any problem then please mention it in comments......
Post a Comment