SEO Search

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 5 April 2012

A Simple Related Posts Widget For Blogger

Posted on 07:53 by Unknown
In the last tutorial, i've been talking about the Related Posts widget that shows related posts along with thumbnails just at the end of your blog articles. Some of the users, however, would prefer a simpler and cleaner displaying of their related posts so that it would show just the posts titles. So let's begin adding it!

related post, related post blogger, blogger tricks

How to add Related Posts Widget to Blogger

Step 1. Go to Template >> Edit HTML and tick the "Expand Widget Templates" checkbox

Step 2. Find the below tag

</head>

Step 3. And just above it, paste the following code:


<!--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;
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=&quot;Related Posts&quot;;
</script>
<script src='http://helplogger.googlecode.com/svn/trunk/related_posts.js' type='text/javascript'/>
<!--Remove--></b:if>
<!--Related Posts Scripts and Styles End-->

Note:
- if you want to change the size and color of 'Related Posts' title, change the bolded values (17 for the font size and black for the color)
-to change the related post title color, replace the value in red;
-to change the background color on mouseover, replace the color value in blue;

Step 4. Now find (CTRL + F) the below line:

    <div class='post-footer'>

Step 5. Just above it, paste the code below:

<!-- 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>
<script type='text/javascript'> var maxresults=5; removeRelatedDuplicates(); printRelatedLabels(&quot;<data:post.url/>&quot;); </script> </div> <!--Remove--></b:if> <!-- Related Posts Code End-->

Note: In order to change the number of maximum related posts being displayed for each label, search for the code max-results=5 and change the number "5" to any desired number.

Step 6. Save Template

Enjoy!!!
Email ThisBlogThis!Share to XShare to Facebook
Posted in blogger, blogger posts, posts, related posts, Widgets | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • CSS Basics. How to Apply Rounded Corners On Images #1
    This tutorial will explain how to change the outside border of any image using some simple CSS rules to make it round, but this is so easy t...
  • How to change Blogger "Post A Comment" Message
    In this tutorial i will show you how to replace the 'Post A Comment' text that appears above the comment form with an image. Also, I...
  • Google Translate Widget with Flags For Blogger
    The Google Translate Widget for Blogger allows the visitors to translate your site or blog in their own language. This widget also auto-dete...
  • How to Write SEO Optimized Blog Posts
    I'm not a SEO Expert, nor what we will read further is a top secret, but this is something about basic positioning that everyone should ...
  • Scriptaculous image slider/carousel for Blogger
    This is a very nice carousel slideshow made by Brian R. Miedlar which shows a gallery of images having a sliding effect that returns to the...
  • A Simple Related Posts Widget For Blogger
    In the last tutorial, i've been talking about the Related Posts widget  that shows related posts along with thumbnails just at the end ...
  • Blogger Auto Video Template by webbilgi
    Rate this template: Demo: Click here for Demo Source And Designer: Author page Click here to Download Features: Automatic thumbnail creati...
  • A Beautiful jQuery Drop-Down Menu For Blogger Blogspot
    Alright, this time, we are going to make a stylish and simple jQuery drop down menu. The main objective is to make it as simple as possible,...
  • Turn off the lights with jQuery
    For those who enjoy watching videos on the net, this is a very useful script made by Janko with jQuery. So what this script does? It will ...
  • How to add go to top and go to bottom buttons Using jQuery in Blogger
    The Up and Down buttons can be used to navigate to the top and bottom of the page content, especially when on the main page there are many ...

Categories

  • adsense
  • adsense optimization
  • adsense tips
  • Auto Video Template
  • avatars
  • blockquotes
  • Blog Design
  • blogger
  • blogger posts
  • color code generator
  • Comments
  • comments tricks
  • css
  • emoticons
  • Emoticons/Smileys
  • Facebook
  • feedburner
  • forum
  • Hacks
  • how to
  • how to make a blog
  • Image Effects
  • internet
  • jQuery
  • labels
  • menus
  • Navigation
  • navigation menu
  • popular posts
  • posts
  • read more
  • recent comments
  • recent posts
  • related posts
  • RSS
  • SEO
  • sitemaps
  • slideshows
  • social media
  • social media plugins
  • static pages
  • Templates
  • threaded comments
  • titles
  • tools
  • translating
  • webbligi
  • Widgets

Blog Archive

  • ►  2013 (57)
    • ►  November (4)
    • ►  October (16)
    • ►  September (13)
    • ►  June (3)
    • ►  May (4)
    • ►  April (5)
    • ►  March (12)
  • ▼  2012 (73)
    • ►  July (1)
    • ►  June (3)
    • ►  May (9)
    • ▼  April (23)
      • Google Translate Widget with Flags For Blogger
      • Simple Recent Posts Widget for Blogger/Blogspot
      • A Beautiful jQuery Drop-Down Menu For Blogger Blog...
      • How to Add Emoticons/Smileys in Blogger Comments
      • How To Add or Change Favicon on Blogger Blogspot
      • How to number comments in Blogger/BlogSpot
      • How to Add A Comment Count Bubble To Blogger Post ...
      • How to Add Different Backgrounds In Blogger Pages
      • How to Add Different Background Color or Image in ...
      • How to Create Static Pages in Blogger
      • Tips To Avoid Your Google Adsense Account From Get...
      • Ways To Increase Page Impressions and Traffic on Y...
      • How to Replace Older Posts and Newer Posts Links w...
      • How To Disable or Turn Off Lightbox View For Blogg...
      • Blogger Auto Video Template by webbilgi
      • Add a Popular Posts Gallery just above your Blogge...
      • Add Google Adsense to Blogger Header (Above the Ti...
      • How to add an image next to Blogger Post Title
      • How to remove Blogger Picture/Image Shadow and Border
      • Replace Older, Newer And Home Blogger links with a...
      • Add Static Facebook Pop Out Like Box with Smooth J...
      • Amazing Examples To Customize Blockquote Style In ...
      • A Simple Related Posts Widget For Blogger
    • ►  March (30)
    • ►  February (7)
Powered by Blogger.

About Me

Unknown
View my complete profile