How to Install Recent Post Widget on Blog

How to Install Recent Post Widget on Blog
How to Install Recent Post Widget on Blog - This time Arlina Design will share a widget that may be familiar to blogger friends.

This widget still has the same function as the recent post widget with navigation that I have shared before, namely to bring up feeds from the latest posts on our blog. Only difference is this widget does not display the thumbnail of the post and the appearance is quite simple, which makes this widget light and the process of loading a blog page even faster.

Here are the steps to install this widget on the blog:

1. Open Blogger> Layout> Add a new widget then copy and save all the code below in it
<style scoped='' type="text/css">
ul#recent-posts{list-style:none;margin:0;padding:0}li.recent-posts{display:block;clear:both;overflow:hidden;list-style:none;border-bottom:1px solid #e3e3e3;word-break:break-word;padding:10px 0;margin:0;}
li.recent-posts:last-child{border-bottom:0;}
li.recent-posts a{color:#444;}li.recent-posts a:hover{color:#444;text-decoration:underline}
</style>
<ul id="recent-posts"></ul>
<script>
//<![CDATA[
var homePage = "http://www.URL_BLOG_ANDA.com",
numPosts = 5;
function recentPosts(a){if(document.getElementById("recent-posts")){var e=a.feed.entry,title,link,content="",ct=document.getElementById("recent-posts");for(var i=0;i<numPosts;i++){for(var j=0;j<numPosts;j++){if(e[i].link[j].rel=="alternate"){link=e[i].link[j].href;break}}var title=e[i].title.$t;content+='<li class="recent-posts"><a href="'+link+'" title="'+title+'" target="_blank" rel="nofollow">'+title+'</a></li>'}ct.innerHTML=content}}var rcp=document.createElement('script');rcp.src=homePage+'/feeds/posts/summary?alt=json-in-script&orderby=published&max-results='+numPosts+'&callback=recentPosts';document.getElementsByTagName('head')[0].appendChild(rcp);
//]]>
</script>
Catatan : Ganti kode yang ditandai dengan URL blog sobat dan jumlah post yang akan ditampilkan.
2. Simpan widget dan lihat hasilnya.

So about How to Install Recent Post Widget on the Blog, hopefully useful.
𝕵𝖔𝖑𝖆
𝕵𝖔𝖑𝖆 Kyɛfa yɛ fɛ, nanso sɛ woannya mfaso mfi kyɛfa mu a, so wokɔ so kyɛ? Me nsusuw sɛ ɛho hia, momma yɛnkɔ so nkyerɛw blog

Post a Comment for "How to Install Recent Post Widget on Blog"