It can increase your pageviews by adding most popular and interesting post in your widget like sidebar or footer just like this blog. Looks at this picture below, yeah you will make this awesome widget in your own blog.
Here How you can make popular post widget in blogspot easily, You just need to add this code below into your HTML/Javascript widget:
<script language='javascript'>Don't forget to save your work and see what happen to your blog.
aBold = false;
numposts=200;
maxshowresult=7;
home_page = "http://Blogsobat.blogspot.com/";
</script>
<script type='text/javascript'>
//<![CDATA[
var postTitlear=new Array();var postUrlar=new Array();var postCommentar=new Array();var totalpost;document.write("<ul>");function showrecentposts(j){var a=j.feed.entry.length;totalpost=a;for(var f=0;f<a;f++){var h=j.feed.entry[f];var c=h.title.$t;var b;var g;if(f==j.feed.entry.length){break}for(var d=0;d<h.link.length;d++){if(h.link[d].rel=="alternate"){g=h.link[d].href;break}}for(var d=0;d<h.link.length;d++){if(h.link[d].rel=="replies"&&h.link[d].type=="text/html"){b=h.link[d].title.split(" ")[0];break}}c=(aBold)?"<b>"+c+"</b>":c;postTitlear.push(c);postUrlar.push(g);postCommentar.push(b)}sortPosts();for(var f=0;f<maxshowresult;f++){var e='<li><a href="'+postUrlar[f]+'" class="recent-link">'+postTitlear[f]+" ("+postCommentar[f]+" comments)</a>";document.write(e)}}function sortPosts(){function c(d,f){var e=postTitlear[d];postTitlear[d]=postTitlear[f];postTitlear[f]=e;var e=postUrlar[d];postUrlar[d]=postUrlar[f];postUrlar[f]=e;var e=postCommentar[d];postCommentar[d]=postCommentar[f];postCommentar[f]=e}for(var b=0;b<postTitlear.length-1;b++){for(var a=b+1;a<postTitlear.length;a++){if(parseInt(postCommentar[b])<parseInt(postCommentar[a])){c(b,a)}}}}document.write('<script src="'+home_page+"feeds/posts/default?max-results="+numposts+'&orderby=published&alt=json-in-script&callback=showrecentposts"><\/script>');
//]]>
</script>
Note: See at the red code:
- aBold = false : You just need to change the false to true, to make the fonts Bold
- maxshowresult=7 : Change the number as how much the popular post you want to show
- home_page = "http://yourblogname.blogspot.com/" : replace with your blog link
Hopefully this script about How to make Popular Post in Blogspot still works well in your blog. Let me know your comments below.
nice post...but is it not to difficult to try?? well i'm kind of not to smart newbie...but i thin it's worth to try...thanks for the info...hopefully it will be beneficial for my store
ReplyDeleteyou are right.. try it out and then see what happen with your blog :)
ReplyDelete