Blogging is one of the simple, easy & an interesting way to share your ideas, technology, tricks, tips & information with the world. Blogger.com provides free blogs & templates. Now you can easily make your free blog with the help of blogger. There are millions of people who are writing blogs & are also liked by the readers. This blog - Wide Info Blog provides blogger tips, tricks & tutorials. Previously we have discussed - How to Blink Text / Link.
Now, Steps for Displaying Latest posts from a specific label in blogger.
Step - 1. Login into your blogger account to which you want to Display Latest Posts from a Specific Label.
Step - 2. Now, Go to "Layout" Tab & click "Add a Gadget" where you want to add as shown below. Now add "HTML / JavaScript", copy & paste the following code.
Code :
<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://www.MY-DOMAIN.com/feeds/posts/summary/-/Placement Papers?max-results=2&alt=json-in-script&callback=recentpostslist" style="float:right;font:bold 10px Arial;padding:5px 0;"></script>
- MY-DOMAIN by your blog url
- results=2, by results=5 or more (No. Of Posts)
- Placement Papers - by your label Name
No comments:
Post a Comment