I Look 12

Blogging, Computers, Internet, Gaming, Make Money Online


Related Posts For Blogger






In this post, I will explain how to add related posts/related articles on your blogger/blogspot blog based on labels. It will be just easy.

1. Follow this guide on How To Edit Your Blog Template

2. Find(CTRL+F) </head>

3. Replace it with these codes below
<!-- RELATED POSTS -->
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<script type='text/javascript'>
var relatedpoststitle=&quot;TITLE&quot;;
</script>
<script src='http://blogergadgets.googlecode.com/files/related.js' type='text/javascript'/>
</b:if>
<!-- RELATED POSTS -->
</head>

TITLE: change it to your desired title (ex. Related Posts or Recommended Posts)

4. Find(CTRL+F) <data:post.body/>

5. Add these codes BELOW <data:post.body/>
<!-- RELATED POSTS -->
<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=5&quot;' type='text/javascript'/>
</b:if>
</b:loop>
<script type='text/javascript'>
var currentposturl=&quot;<data:post.url/>&quot;;
var maxresults=NUMBER_OF_RESULTS;
removeRelatedDuplicates(); printRelatedLabels();
</script>
</div>
<!-- RELATED POSTS -->

NUMBER_OF_RESULTS: Change it to the number of results you want to appear (any number, though I recommend to set it to 5)

6. Click Save Template.










What are the benefits of being a subscriber?
All subscribers will get these updates directly from their email.
  • Blogging/SEO tips and tutorials
  • Technology news and tips
  • Computer tips, guides and optimizations
  • Gaming tips, tricks and cheat guides
  • Online money making tips
If you wish to subscribe, just fill up the form below:
Email address:
Lijit Search

Followers

Translate

Blogging, Computers, Internet, Games, Make Money Online.