Beautiful related posts text widget with hover effect for blogger

Simple And Stylish "Related Posts" Text Widget For Blogspot

I am going to post three awesome styled Text only related post widget for blogger. I really post this for my friend Rohit Malik ,who asked me for this widget . Actually, related posts widget decrease your blog's bounce rate. Also many related posts widget for blogger look boring and ugly. An those having images will increase up your blog loading time.This related post has no image and loads faster.So, hope you like all of the three.


Features:


1.) Simple With 3-Stylish Design.
2.) Page Counter.Dark And Light Effect.
3.) Only Text To Remain Your Blog Loading Speed Fast.

How To Add In Blogspot?

1.) Go To Your Blogger Dasboard
2.) Open Your Desire Blog.
3.) Go To HTML.
4.) Click "Edit HTML"
5.) Check On "Expand Widget Template"
6.) Now Do As I Did.
7.) Find This Line Using Ctrl+F Function.

</head>

And Copy The Below JavaScript Code And Paste It Before/Above It.


<!--RelatedPostsStarts-->
<script language='JavaScript'>
//<![CDATA[
var relatedTitles = new Array();
var relatedTitlesNum = 0;
var relatedUrls = new Array();
function related_results_labels(json) {
for (var i = 0; i < json.feed.entry.length; i++) {
var entry = json.feed.entry[i];
relatedTitles[relatedTitlesNum] = entry.title.$t;
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
relatedUrls[relatedTitlesNum] = entry.link[k].href;
relatedTitlesNum++;
break;
}
}
}
}
function removeRelatedDuplicates() {
var tmp = new Array(0);
var tmp2 = new Array(0);
for(var i = 0; i < relatedUrls.length; i++) {
if(!contains(tmp, relatedUrls[i])) {
tmp.length += 1;
tmp[tmp.length - 1] = relatedUrls[i];
tmp2.length += 1;
tmp2[tmp2.length - 1] = relatedTitles[i];
}
}
relatedTitles = tmp2;
relatedUrls = tmp;
}
function contains(a, e) {
for(var j = 0; j < a.length; j++) if (a[j]==e) return true;
return false;
}
function printRelatedLabels() {
var r = Math.floor((relatedTitles.length - 1) * Math.random());
var i = 0;
document.write('<ul>');
while (i < relatedTitles.length && i < 6) {
document.write('<li><a href="' + relatedUrls[r] + '">' + relatedTitles[r] + '</a></li>');
if (r < relatedTitles.length - 1) {
r++;
} else {
r = 0;
}
i++;
}
document.write('</ul>');
}
//]]>
</script>
<!--RelatedPostsStops-->



8.) Now Copy The Below HTML Code And Paste It Where You Want To Show Related Posts Widget.

Like I Suggest To Find These Line Using Ctrl+F Function.


<div class='post-footer-line post-footer-line-2'/>
<div class='post-footer-line post-footer-line-3'/>
</div>
</div>


And Edit The Below HTML Code Then Copy It And Paste It Below/After It.


<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=5&quot;' type='text/javascript'/></b:if>
</b:loop>
<script type='text/javascript'>
var currentposturl=&quot;<data:post.url/>&quot;;
var maxresults=5<!-- Increase To Show More Then 5 Related Post -->
removeRelatedDuplicates(); printRelatedLabels();
</script>
</div>
</b:if>


9.) Next, Find The Below Line Using Ctrl+F Function:

]]></b:skin>

Final, Choose Any One Style, And Insert The Corresponding CSS Code Above It.


Style 1:-

Simple And Stylish "Related Posts" Text Widget For Blogspot



#related-posts {clear: both;}
#related-posts ul{margin: 20px 0; padding: 0;list-style: none;}
#related-posts ul li {border-top: 1px solid #333;border-bottom: 1px solid #111;}
#related-posts ul li:first-child {border-top: none;}
#related-posts ul li:last-child {border-bottom: none;}
#related-posts ul li a {padding: 10px;display: block;color: #222;text-decoration: none;cursor: pointer; -webkit-transition: padding-left 250ms ease-out; -moz-transition: padding-left 250ms ease-out; /* trans pattern: property duration timingMethod delay */}
#related-posts ul li a:hover {padding-left: 20px;}


Style 2:-

Simple And Stylish "Related Posts" Text Widget For Blogspot


#related-posts {clear: both;}
#related-posts ul{margin: 20px 0; padding: 0;list-style: none;}
#related-posts ul li {border-top: 1px solid #333;border-bottom: 1px solid #111;background: #222;}
#related-posts ul li:first-child {border-top: none;}
#related-posts ul li:last-child {border-bottom: none;}
#related-posts ul li a {padding: 10px;display: block;color: #fff;text-decoration: none;cursor: pointer; -webkit-transition: padding-left 250ms ease-out; -moz-transition: padding-left 250ms ease-out; /* trans pattern: property duration timingMethod delay */}
#related-posts ul li a:hover {padding-left: 20px;background: #111;}


Style 3:-

Simple And Stylish "Related Posts" Text Widget For Blogspot


#related-posts {clear: both;}
#related-posts h2{color: #fff;}
#related-posts ul{margin: 20px 0; padding: 0;list-style: none;}
#related-posts ul li {border-top: 1px solid #333;border-bottom: 1px solid #111;background: #222;}
#related-posts ul li:first-child {border-top: none;}
#related-posts ul li:last-child {border-bottom: none;}
#related-posts ul li a {padding: 10px;display: block;color: #fff;text-decoration: none;cursor: pointer; -webkit-transition: padding-left 250ms ease-out; -moz-transition: padding-left 250ms ease-out; /* trans pattern: property duration timingMethod delay */}
#related-posts ul li a:hover {padding-left: 20px;background: #111;}

I hope this widget will help you in increasing your SEO and Bounce Rate.Happy blogging!!!!!

26 comments:

  1. b:skin tag is written wrong please delete the older comment

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. Not working in my blog, maybe googlecode isn't working anymore.Please re-check it then tell me if I m wrong. I will be waiting for your reply. THANKS.

    ReplyDelete
    Replies
    1. I will update in 5 mins .please wait

      Delete
    2. Now it's working fine. THANKS One more thing, I changed max-result=5 to 4 but it's showing neither 5 nor 4 but 6 posts. Not a bad thing, just wanna know how things work.

      Delete
  4. Thanks for this share. I am going to find this.

    ReplyDelete
  5. Thank you very much.

    ReplyDelete
  6. Thanks i believe that related post widget plays an important role in engaging the user and also to increase traffic.even those posts that did not get good amount of traffic gets clicked because of the same labels and hence hardwork of admins and writer gets rewarded.so i will say it is like a traffic booster.Related post widget for blogger

    ReplyDelete
  7. Wow, wondеrful blog layout! How long haνe you been blоgging for? уou maԁе bloggіng lοoκ еаsy. The ονеrall look of your websitе іs wоnderful, as well аs the сοntent! visit my blog

    ReplyDelete
  8. I found that it is not showing title 'Related Posts' in my blog.....please help me.....

    www.technocrysis24x7.blogspot.in

    ReplyDelete
  9. Yes this script do work. Nice share. But because of some reasons of handling, i uses nRelate instead. It works really well for me by offering some options in addition, allows you to display ads and earn from it. I'm not using that feature anyway, but newbie bloggers must check it out. Do a visit @ http://Bit.ly/fLQfc5 and realize how it works like charm!!

    ReplyDelete
  10. If youth is a defect, it is one that we outgrow only too soon.

    ReplyDelete
  11. download free games http://earningjobsnetwork.blogspot.com

    ReplyDelete
  12. hi thanks it works but not showing title "related post".

    ReplyDelete
  13. not working properly. it shows only 6 posts.

    ReplyDelete
  14. If you are missing the title in the first bit of code after the

    var i = 0;

    add

    document . write ( ' related posts ' ) ;

    just take out the spaces in the line

    I got it working on my blog: www.802101.com you can change the h3 header to any size you want

    ReplyDelete
  15. Thank you for this tips, I will try this in my blog

    ReplyDelete
  16. You got a definitely helpful blog I’ve been right here reading for about an hour. I’m a newbie and your accomplishment is quite a lot an inspiration for me.

    ReplyDelete
  17. why it shows only 6 , though i select 10,,,,,,pls fix it and reply soon,
    i am designing
    my blog-
    earning-cafe.blogspot.com

    ReplyDelete
  18. thank you so much it looks really nice i have applied it to my blog working demo Techzondo

    ReplyDelete
  19. thank you so much it looks really nice i have applied it to my blog working demo Techzondo

    ReplyDelete
  20. How do add bullet before every post. Like in your blog?

    ReplyDelete

Please don't spam. We hate spammers