Home / Tips / How To Brand Widget Recent Post

How To Brand Widget Recent Post

How to Set Recent Post Widget inwards Our Blog

Please re-create together with relieve this code below inwards our widget blog, on HTML/JavaScript

 <ul id=”recent-posts”></ul>
var homePage = “http://learningbasedweb.blogspot.com/”,
numPosts = 3;
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”><strong><a href=”‘+link+'” title=”How to Make Widget Recent Post” target=”_blank”>’+title+'</a></strong></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);

How to Arrange It
Below are the ways to laid the chemical component of this widget inwards the blog. There is 2 things that you lot should practise here. First, you lot must sympathise what is the Icon varhomePage; It tells your website URL. You tin fill upward it inwards this form. Second, you lot must sympathise virtually what is Icon nuPosts; it tells us virtually how many articles which the blogger volition laid inwards the blog’s widget.

var homePage
Fill alongside your weblog URL
Fill alongside the total of our Articles which volition hold out displayed

To gear upward the total of your articles that volition hold out displayed on the widgets, meet the sentences that i hand the mark. You must hold back at the sentences alongside the bluish background. In here, you lot must modify past times your website condition.

Ok That’s all of my explanation virtually how to practise recent ship service widget. If whatever questions delight contact me past times giving comment below. Thanks

Baca Juga:   Cara Mendaftar Paket Speedy Dan Menikmati Layanan Wifi Id Di Rumah Gratis

About adminkoepas

Check Also

Panduan dan Tips untuk mengunjungi desa Baduy

Urang Kanekes, Orang Kanekes atau Orang Baduy/Badui merupakankelompok masyarakat adat suku Banten di wilayah Kabupaten …