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 {
height:0px;
visibility:hidden;
display:none;
Paste the code above before ]]></b:skin> 
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 == &quot;item&quot;'>
<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: &quot;Trebuchet MS&quot;, 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=&quot;Related Posts:&quot;;
</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-->
<!--Remove--><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><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(&quot;<data:post.url/>&quot;);
</script>
</div>
<!--Remove--></b:if>
<!-- Related Posts Code End-->
credits goes to BloggerPlugins 

3. Do you like this story? 

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div style='background:#deded7;height: 100px; margin: 10px 0 10px 0; padding:10px;'>
<div style='color: #343434; font-family:&quot;Trebuchet MS&quot;, 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>
 change the twitter username to yours. Paste the code below <data:post.body/>. For the full tutorial go to MyBloggerTricks.com

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>
<script src="http://YOUR BLOG URL/feeds/posts/default?max-results=500&alt=json-in-script&callback=loadtoc"></script>
 credits goes to Abu-Farhan.com

Comments

  1. 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.

    ReplyDelete
  2. That 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
  3. @Stephen M. Young II
    Be sure to check the "Expand Widget Templates" at the top left

    ReplyDelete

Post a Comment

Feel free to ask, suggest and comment regarding this post/blog. You can also contact me through e-mail, just always use the contact page. Thank you for visiting this blog.

Popular posts from this blog

Creating heat map using GeoDjango

Setting Up 404 Page Not Found in Blogger

Publish PostGIS Layers in GeoServer Automatically using cURL and REST