Tell the visitor most commented Post according to total no. of comments.The widget will be updated automatically whenever the blog is viewed.The working of The widget is Feed which is filter by yahoo Pipe.Whenever the comment increases the popularity of the Post will also Grow.Demo is in ends of Post.To add kindly follow us.
Most Commented post widget JavaScript Code.
The JavaScript code of Most Commented post is
<!-- Popular posts with comment count Start --> <script type="text/javascript"> function getYpipePP(feed) { document.write('<ul class="br-mcp">'); var i; for (i = 0; i < feed.count ; i++) { var href = "'" + feed.value.items[i].link + "'"; var pTitle = feed.value.items[i].title; var pComment = " \(" + feed.value.items[i].commentcount + "\)"; var pList = "<li>" + "<a href="+ href + '" target="_blank">' + pTitle; document.write(pList); document.write(pComment); //to remove comment count delete this line document.write('</a></li>'); } document.write('</ul>'); } </script> <script src="http://pipes.yahoo.com/pipes/pipe.run? BlogUrl=http://bloggerrounder.blogspot.com &TotalNumber=10 &_id=ea575311ae87de1e2b437ca52cc0128f &_callback=getYpipePP &_render=json" type="text/javascript"></script> <span style="font-size: 75%; float:right;"><a href="http://bloggerrounder.blogspot.com/2011/05/most-commented-post-titles-widget-for.html" target="_blank">Grab your Own.</a></span> <!-- Popular posts with comment count End -–>
Where,
- In Line 4 and 16 change
ul
tool
for Numbered List. - In line 20 change http://bloggerrounder.blogspot.com with your own url without including slash at last.
- In line 13 remove that line for removing comment count.
- In Line 21 change 10 to show how many number of post to be shown.
Adding Most Commented post In Blogger.
At Static Page.
- Go to Blogger Dashboard>Pages
- Click on New Page.
- Switch to HTML mode.
- Add the most Commented Post JavaScript Codes.
- In post option tick on ignore new lines.
- Click on Publish button without switching to Compose Mode.
Add it as Widget,
- Go to Blogger Dashboard>Layout
- Click on Add a Gadget
- Select HTML/JavaScript
- Add the Most Commented Post JavaScript Codes.
Styling the Most Commented Post List.
To style most commented post List add this CSS in your Template
.br-mcp { /*CSS styling Codes Here*/ }
Demo Of Most Popular Post.
Grab your Own.Bye.
Subscribe for free
Thanks for visiting Blogger Rounder.We can subscribe to Blogger Rounder's by RSS feed or email updates.
0 comments on "Most Commented Post Titles Widget for Blogger.":
Post a Comment
We Love To Hear Comments from You.Comments are Welcome.You can comment here regarding this Post.If it is not related with the post you can ask a question by Contacting Us.Before Comment Please Subscribe To our RSS or email updates.Publishing Spam Comment is Not allowed.If you want to Add Code then Please Encode it.
Simple Tags like <a> ,<strong>,<b>,<em> and <i> are allowed for preventing spam