Five Useful Codes for Your Blog
This is my base on my personal thoughts. So let's start.
1. How to remove or hide Navbar in Blogger?
#navbar-iframe {Paste the code above before ]]></b:skin>
height:0px;
visibility:hidden;
display:none;
or under
Blogger Template Style
Name:****
Designer: ****
URL:****
Date: *****
Updated by: Blogger Team
----------------------------------------------- */
credits goes to Blogbulk.com
2. Adding Related Articles on your Post
<!--Related Posts Scripts and Styles 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 .widget{
padding-left:6px;
margin-bottom:5px;
}
#related-posts .widget h2, #related-posts h2{
font-size: 16px;
font-weight: bold;
color: #343434;
font-family: "Trebuchet MS", sans-serif;
margin-bottom: 7px;
margin-top: 0em;
padding-top: 0em;
}
#related-posts a{
color:#516a6a;
}
#related-posts a:hover{
color:#4b4b47;
}
#related-posts ul{
list-style-type:none;
margin:0;
padding:0;
font-size:15px;
text-color:#343434;
}
#related-posts ul li{
display:block;
list-style-type:none;
padding:0 0 0 10px;
margin-bottom:3px;
</style>
<script type='text/javascript'>
var relatedpoststitle="Related Posts:";
</script>
<script src='http://blogergadgets.googlecode.com/files/related-posts-for-blogger.js' type='text/javascript'/>
<!--Remove--></b:if>
<!--Related Posts Scripts and Styles End-->
Paste the code before </head>, then find <div class='post-footer-line post-footer-line-1'> after this line paste this code:
<!-- Related Posts Code Start-->credits goes to BloggerPlugins
<!--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>
<b:if cond='data:blog.pageType == "item"'>
<script expr:src='"/feeds/posts/default/-/" + data:label.name + "?alt=json-in-script&callback=related_results_labels&max-results=6"' type='text/javascript'/></b:if></b:loop><a href='http://www.bloggerplugins.org/2009/08/related-posts-for-blogger-widget.html'><img style="border: 0" alt="Related Posts Widget for Blogger" src="http://image.bloggerplugins.org/blogger-widgets.png" /></a>
<script type='text/javascript'>
var maxresults=5;
removeRelatedDuplicates(); printRelatedLabels("<data:post.url/>");
</script>
</div>
<!--Remove--></b:if>
<!-- Related Posts Code End-->
3. Do you like this story?
<b:if cond='data:blog.pageType == "item"'>change the twitter username to yours. Paste the code below <data:post.body/>. For the full tutorial go to MyBloggerTricks.com
<div style='background:#deded7;height: 100px; margin: 10px 0 10px 0; padding:10px;'>
<div style='color: #343434; font-family:"Trebuchet MS", sans-serif;font-size:16px; font-weight:bold;margin: 0pt 0pt 5px;'>
Consume less; share better.</div>
<div id='fb-root'>
</div>
<script src='http://connect.facebook.net/en_US/all.js#xfbml=1'>
</script><fb:like send='true' show_faces='false' width='450'/> <a class='twitter-follow-button' href='http://twitter.com/idsilmat' rel='nofollow'/> <script src='http://platform.twitter.com/widgets.js' type='text/javascript'>
</script> </div></b:if>
4. Back to Top Button
<a rel="nofollow" style="display:scroll;position:fixed;bottom:10px;right:5px;" href="#" title="Back to Top"><img src="ADD URL OF BACK TO TOP BUTTON HERE"/></a>
credits goes to MyBloggerTricks.com
5. Archive Page
<script style="text/javascript" src="http://abu-farhan.com/script/daftarisibloggerarchive/tocbyarchivemin.js"></script>credits goes to Abu-Farhan.com
<script src="http://YOUR BLOG URL/feeds/posts/default?max-results=500&alt=json-in-script&callback=loadtoc"></script>
useful codes I have heard some of them before but archive page is something I haven't heard about for blogger really a nice information.
ReplyDeleteThat second code looks interesting. Related post suggestions? I just can't find the <div class='post-footer... part of the code on my template.
ReplyDelete@Stephen M. Young II
ReplyDeleteBe sure to check the "Expand Widget Templates" at the top left