Back Image

How to List Recent Post Titles by Label...


To add this widget follow these steps:-

01). First Go To Blogger -> Layout

02). Add a HTML / JavaScript Gadget

03). Now paste the following code in it

" <!-- List of Posts by Label Start -->
<!-- code by TipsTricksIsland.com -->
<script type="text/javascript">
function recentpostslist(json) {
 document.write('<ul>');
 for (var i = 0; i < json.feed.entry.length; i++)
 {
    for (var j = 0; j < json.feed.entry[i].link.length; j++) {
      if (json.feed.entry[i].link[j].rel == 'alternate') {
        break;
      }
    }
var entryUrl = "'" + json.feed.entry[i].link[j].href + "'";//bs
var entryTitle = json.feed.entry[i].title.$t;
var item = "<li>" + "<a href="+ entryUrl + '" target="_blank">' + entryTitle + "</a> </li>";
 document.write(item);
 }
 document.write('</ul>');
 }
</script>
<script src="http://newsonadeyak.blogspot.com/feeds/posts/summary/-/දේශීය පුවත්?max-results=10&alt=json-in-script&callback=recentpostslist">
<!-- List of Posts by Label End --></script
04). Change " http://newsonadeyak.blogspot.com/ " with your Site URL & Change Your Label Name " දේශීය පුවත් "

05). Now click on save button

06). View your Blog or Site and you are done ! 

0 comments:

Post a Comment