Info, Tutorials, Downloads, Audio Books, Videos, Ebooks and More

Monday, May 8, 2017

Simple Recent Post Widget for Blogger.

Simple Recent Post Widget helps to display your recent post on your specific page or on sidebar. Here is simple steps to add Simple Recent Post Widget on your blogger blog.

Simple Recent Post Widget for Blogger


Step 1 : Login to your Blog with your Google Account.

Step 2 : Choose your Blog where you want to add Simple Recent Post Widget.

Step 3 : Click on Layout.


Simple Recent Post Widget for Blogger.


Step 4 : Click on Add a Gadget.
Simple Recent Post Widget for Blogger.


Step 5 : Click on HTML/JavaScript.
Simple Recent Post Widget for Blogger.


Step 6 : Copy the code below to paste on HTML/JavaScript and Save it.
Simple Recent Post Widget for Blogger.




Code Start 
<script type="text/javascript">

 var numposts = 5;
 var standardstyling = true;

 function showrecentposts(json) {
  for (var i = 0; i < numposts; i++) {
   var entry = json.feed.entry[i];
   var posttitle = entry.title.$t;
   var posturl;
   if (i == json.feed.entry.length) break;
   for (var k = 0; k < entry.link.length; k++) {
    if (entry.link[k].rel == 'alternate') {
     posturl = entry.link[k].href;
     break;  }}
   posttitle = posttitle.link(posturl);
   if (standardstyling) document.write('<li>');
   document.write(posttitle);  }
   if (standardstyling) document.write('</li>'); }
</script>
<br />
<ul>
 <script src="/feeds/posts/default?orderby=published&alt=json-in-script&callback=showrecentposts&max-results=999"></script>
</ul>
Code End

Customize :

var numposts = 5;

Change value 5 to change total display links.

Refresh your Blog to Check :)

Enjoy Blogging.


Recommended Articles :


No comments:

Post a Comment

Dear Readers,

Great !! You've decided to leave comment for us. Let's make meaningful conversation by adding your name.

Please note that,

Comments deemed to be spam or questionable spam, including profanity and containing language or concepts that could be deemed offensive will be deleted.
Including a link to relevant content is permitted, but comments should be relevant to the post topic.