Do you want to add Related posts/Similar posts widget below every post on your blog?
Lets do this :
Although you do not have to use this file as I have already linked the file in STEP #5. So, store this file as a back up on your PC.
1. Go to Blogger.com
2. Now go to "Template" then to "Edit HTML" section
3. Back up your present template.
4. Now click on "Expand widget templates".
5. Find this code:
Paste BEFORE/ABOVE this code:
And after that line, paste this code:
Now save your template.
*(Remember to add labels after your posts, during publishing them)
Lets do this :
Although you do not have to use this file as I have already linked the file in STEP #5. So, store this file as a back up on your PC.
1. Go to Blogger.com
2. Now go to "Template" then to "Edit HTML" section
3. Back up your present template.
4. Now click on "Expand widget templates".
5. Find this code:
]]></b:skin>
Paste BEFORE/ABOVE this code:
6. Now search for this code line:
<!-- Related Post css -->
<!--start related posts css Info : http://www.allhelpz.blogspot.com-->
ul#related-posts{
font-family:"Droid Sans",Helvetica,Arial,sans-serif;
font-size:10px;
list-style: none;
margin: 20px 0;
padding: 0;
text-transform: none;
}
ul#related-posts li{
float: left;
height: auto;
margin:0 5px;
padding: 2px 1px 2px;
list-style-type:none;
}
*html ul.rp#related-posts li{
margin:0 13px;
}
ul#related-posts li a {
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
border: 2px solid #FFFFFF;
display: block;
height: 72px;
position: relative;
width: 72px;
}
ul#related-posts li a {
color: #474C51;
text-decoration: none;
text-shadow: 0 1px 0 #FFFFFF;
}
ul#related-posts li .overlay {
height: 66px;
line-height: 16px;
padding:6px 0 0 6px;
position: absolute;
width: 66px;
z-index: 10;
}
ul#related-posts li .overlay {
}
ul#related-posts li a:hover .overlay {
background: #fff;
display: block !important;
opacity:0.9;
}
ul#related-posts li img {
bottom: 0;
padding:0px !important;
}
ul#related-posts li a:hover {
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
<!--end related posts css.Info : http://www.allhelpz.blogspot.com-->
<div class='post-footer'>
And after that line, paste this code:
To change the number of similar/related posts to be displayed, change the code max-results=6
<!--start related posts code Info : http://www.allhelpz.blogspot.com-->
<b:if cond='data:blog.pageType == "item"'>
<h3>Related Posts:</h3>
<script type='text/javascript'>
var defaultnoimage="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ2s1GFfPjdUP1TeeIuiW7yYr_kw0a8CfuyYeZurGZsv7DohugU_mBPHLeXME6RIHSPYRdOqp4R1A4bKf-4vkgbBt1DHvanxDu1YUfq1SkNaCr0Hdrl92yfJTsYQSLR1rGkLWKPgGiV_U/s1600/no-image.gif";
var maxresults=5;
</script>
<script src='http://suyb.googlecode.com/files/rph.js' type='text/javascript'/>
<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>
</b:if>
<div style='clear:both'/>
<br/>
<!--end related posts code Info : http://www.allhelpz.blogspot.com-->
Now save your template.
*(Remember to add labels after your posts, during publishing them)
[Please comment for any Problem]
I have a problem,, This is everywhere in my Blog.. Where should I past the code..
ReplyDeleteSend a answer to dadecoderspot@gmail.com
This comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDelete