simple recent post widget for blogger

3:56 PM
Wellcome to Blog Guidelines. Hopefully today is better than the day yesterday. On this occasion Blog Guidelines will discuss : Most blog owners expect that visitors linger are on our blog. When you are finished reading one article we wish they unlock the article more. If our desires come true then at least the visitors that can help reduce the bounce rate of a blog.

This kind of desire can be realized in several ways, including us as owners of the blog attempting to display popular post widget, recent post, related articles, recent post and others. with the editor widget-widget at least the visitors involuntarily can see several titles of posts that appear on the widget-widget.

Well, this time the Blog Guidelines attempt to provide guidelines for making a recent post. Recent post that I give is very simple and light, and also how to make it simple. Let's start how to create simple recent post on blogger:
(1) how are you already logged in? If not, please log in to your blogger account
(2) Layout
(3) Add a Gadget
(4) HTML/JavaScript then Add
(5) Insert the following code
<script>
//<![CDATA[
function showlatestposts(json){document.write('<ul id="recent-posts">');for(var i=0;i<7;i++){var entry=json.feed.entry[i];var posttitle=entry.title.$t;var postsurl;if(i==json.feed.entry.length)break;for(var k=0;k<entry.link.length;k++){if(entry.link[k].rel=='alternate'){postsurl=entry.link[k].href;break;}}
document.write('<li class="recent-posts">');document.write('<a href="'+ postsurl+'" target ="_top" title="'+ posttitle+'">'+ posttitle+'</a>');document.write('</li>');}
document.write('</ul>');};
document.write("<scr" + "ipt type="text/javascript" src="/feeds/posts/default?orderby=published&amp;alt=json-in-script&amp;callback=showlatestposts"></scr" + "ipt>");
//]]>
</script>

(6) save, and see the results
Previous
Next Post »
0 Komentar