random
1

Random Posts Widget In Blogger Blog For Increasing Your Page Views

The Random Posts widget of Blogger blog will be display random post from the blogger blog posts on your sidebar or anyplace where you plan to display the random posts widget in your blog. Random Posts Widget would be increase you number of page views from your blogger blog. So, here is how to add stylish Random Posts Widget  in blogger blog for increasing the page views for your blogger blog.

Random Posts Widget In Blogger Blog For Increasing Your Page Views

  1. First Off, Go To Your Blogger Dashboard.
  2. Choose "Template" And Your Next Jump Would Be 'Edit HTML".
  3. Now You Are At Blogger blog Coding Area.
    Random Posts Widget In Blogger Blog For Increasing Your Page Views
    Random Posts Widget In Blogger Blog For Increasing Your Page Views
  4. Just Find, That Piece Of Code In Your Template.   ]]></b:skin>
  5. After Finding That Piece Of Code In Your Template, Just Copy The Below Code And Paste It Just Above  ]]></b:skin> Piece Of Code.
Code:
  1. #random-posts{ border: 1px solid #aaa; margin: -20px 0; -moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; -moz-box-shadow: 0 5px 5px -5px #999; -webkit-box-shadow: 0 5px 5px -5px #999; box-shadow: 0 5px 5px -5px #999; background: #f6f6f6; background: -webkit-gradient(linear, 0% 40%, 0% 70%, from(#f9f9f9), to(#f1f1f1));background: -moz-linear-gradient(linear, 0% 40%, 0% 70%, from(#f9f9f9), to(#f1f1f1)); } #random-posts li{ background: url(http://i.imgur.com/d2qDDPf.png) no-repeat 12px; border-bottom: 1px solid #ccc; font-family: cambria; font-size: 12pt; list-style-type:none; margin:0; padding:6px 10px 10px 3em !important; height: 44px;overflow:hidden; line-height: 1.5em; }
    Now Save Your Template. You Have Successfully Added That CSS Code To Your Template.
  2. Now Go To Your Main Blogger dashboard Again.
  3. And Select "Layout'.
  4. Choose "Add Gadget" Where You Are Interested To Display That Widget.
  5. Select "HTML/JavaScript".
  6. And Finally, Just Copy the Below Code And Paste It To Your HTML/JavaScript.
Code:
  1. <div id='random-posts'><script type='text/javaScript'> var rdp_numposts=7;var rdp_snippet_length=0;var rdp_info='no';var rdp_current=[];var rdp_total_posts=0;var rdp_current=new Array(rdp_numposts);function totalposts(json){rdp_total_posts=json.feed.openSearch$totalResults.$t}document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&max-results=0&callback=totalposts\"><\/script>');function getvalue(){for(var i=0;i<rdp_numposts;i++){var found=false;var rndValue=get_random();for(var j=0;j<rdp_current.length;j++){if(rdp_current[j]==rndValue){found=true;break}};if(found){i--}else{rdp_current[i]=rndValue}}};function get_random(){var ranNum=1+Math.round(Math.random()*(rdp_total_posts-1));return ranNum};</script><script type='text/javaScript'> function random_posts(json){for(var i=0;i<rdp_numposts;i++){var entry=json.feed.entry[i];var rdp_posttitle=entry.title.$t;if('content'in entry){var rdp_get_snippet=entry.content.$t}else{if('summary'in entry){var rdp_get_snippet=entry.summary.$t}else{var rdp_get_snippet="";}};rdp_get_snippet=rdp_get_snippet.replace(/<[^>]*>/g,"");if(rdp_get_snippet.length<rdp_snippet_length){var rdp_snippet=rdp_get_snippet}else{rdp_get_snippet=rdp_get_snippet.substring(0,rdp_snippet_length);var space=rdp_get_snippet.lastIndexOf(" ");rdp_snippet=rdp_get_snippet.substring(0,space)+"&#133;";};for(var j=0;j<entry.link.length;j++){if('thr$total'in entry);if(entry.link[j].rel=='alternate'){var rdp_posturl=entry.link[j].href;var rdp_postdate=entry.published.$t;if('media$thumbnail'in entry){var rdp_thumb=entry.media$thumbnail.url}else{rdp_thumb="http://2.bp.blogspot.com/-XQt2v4x5dl8/T1zdpFh392I/AAAAAAAABUU/xMJZDedw38k/s1600/default.jpg"}}};document.write('<li>');document.write('<img alt="'+rdp_posttitle+'" src="'+rdp_thumb+'"/>');document.write('<div><a href="'+rdp_posturl+'" title="'+rdp_posttitle+'">'+rdp_posttitle+'</a></div>');if(rdp_info=='yes'){document.write('<span>'+rdp_postdate.substring(8,10)+'/'+rdp_postdate.substring(5,7)+'/'+rdp_postdate.substring(0,4)+' - '+rdp_commentsNum)+'</span>'}document.write('<div style="clear:both"></div></li>')}};getvalue();for(var i=0;i<rdp_numposts;i++){document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&start-index='+rdp_current[i]+'&max-results=1&callback=random_posts\"><\/script>')}; </script></div>

    You Have Done.
  2. Go To Your Blogger blog Live And See The Random Posts Widget In Your Blog.
Random Posts Widget In Blogger Blog For Increasing Your Page Views Reviewed by Ghulam Haider on 21:51:00 Rating: 5

No comments:

All Rights Reserved by Shouted Blog © 2014 - 2015
Designed by Ghulam Haider

Contact Form

Name

Email *

Message *

Powered by Blogger.