Friday, 5 October 2012

Add Related Posts Widget for Blogger

ADD RELATED POSTS WIDGET FOR BLOGGER
ADD RELATED POSTS WIDGET FOR BLOGGER

1. Login to Blogger with your ID.
2. Click Template.
3. Click tab Edit HTML > Proceed > Select Expand Widget Templates.
4. Copy & Past Below Code After ]]></b:skin>

<!--Related Posts Scripts and Styles Start-->
<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;
margin-top: 20px;
}
#related-posts .widget{
padding-left:6px;
margin-bottom:10px;
}
#related-posts .widget h2, #related-posts h2{
font-size: 17px;
font-weight: normal;
color: black;
font-family: Arial Narrow;
margin-bottom: 0.75em;
padding-top: 0em;
}
#related-posts a{
font-size:16px;
color: #555555;
font-variant:small-caps;
}
#related-posts a:hover{
text-decoration: none;
color: #ffffff;
font-weight: bold;
}
#related-posts ul{
list-style-type:none;
margin:0 0 0px 0;
padding:0px;
text-decoration:none;
text-color:#000000
}
#related-posts ul li{
list-style-type: none;
border-left: 2px solid #1399CF;
border-bottom: 1px dotted #1399CF;
margin-bottom: 3px;
padding-left: 30px;
padding-top:0px;
}

#related-posts ul li:hover{
background-color: #1399CF;
border-left: 2px solid #B3CA3D;
border-bottom: 1px dotted #B3CA3D;
}
</style>
<script type='text/javascript'>
var relatedpoststitle="Related Posts";
</script>
<script src='http://musicrootz-tools.googlecode.com/files/related_posts.js' type='text/javascript'/>
</b:if>
<!--Related Posts Scripts and Styles End-->

5. Then Copy & Past Below Code After <div class='post-footer'>

<!--Related Posts Code Start--> <b:if cond='data:blog.pageType == &quot;item&quot;'> <div id='related-posts'> <b:loop values='data:post.labels' var='label'> <b:if cond='data:label.isLast != &quot;true&quot;'> </b:if> <b:if cond='data:blog.pageType == &quot;item&quot;'> <script expr:src='&quot;/feeds/posts/default/-/&quot; + data:label.name + &quot;?alt=json-in-script&amp;callback=related_results_labels&amp;max-results=6&quot;' type='text/javascript'/></b:if></b:loop> <script type='text/javascript'> var maxresults=5; removeRelatedDuplicates(); printRelatedLabels(&quot;<data:post.url/>&quot;); </script> </div> </b:if> <!--Related Posts Code End-->

6. Click SAVE TEMPLATE buttons, and wait until your template saved. Now check blogger.

No comments:

Post a Comment

Here Comes the Hammer: The Tech Industry&#39;s Three Crises

The next few years are going to be extremely uncomfortable, and maybe disastrous, for the tech industry. Political opposition to the big tec...