In this new occasion, SEO Anyaran will give some tips or tutorial how to make recent post widget. May be all bloggers have knew about this widget but it was no problems because we must consider that every week may be every days Indonesian blogger grow and grow. So, this articles is hopefully can contribute to the next blogger. For newbie like me, this articles is very useful because this widget is very simlple to do it.
Before we make the widget, the bloggers have to know that this widget is from Blogger itself but the bloggers can make some modification to make this widget more easy looking. If you wanna make the modification you can browse in the internet how to make it because here just serve a simple widget.
Before we make the widget, the bloggers have to know that this widget is from Blogger itself but the bloggers can make some modification to make this widget more easy looking. If you wanna make the modification you can browse in the internet how to make it because here just serve a simple widget.
Recent Post Widgets is widget which is consist of new recent post from our blogs.This Widget is used to give information to the other bloggers about our new recent post. This is an simpler widget because it is only displays the title of our article. The conclusion, this blog is not disturbing the speed of our blog loading.
How to Set Recent Post Widget in Our Blog
Please copy and save this code below in our widget blog, on HTML/JavaScript<ul id="recent-posts"></ul>
<script>
//<![CDATA[
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="'+title+'" 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);
//]]>
</script>
How to Arrange It
Below are the ways to set the element of this widget in the blog. There is two things that you should do here. First, you must understand what is the Icon varhomePage; It tells your website URL. You can fill it in this form. Second, you must understand about what is Icon nuPosts; it tells us about how many articles which the blogger will set in the blog's widget.
Icon
Text
var homePage
Fill with your blog URL
numPosts
Fill with the total of our Articles which will be displayed
To set up the total of your articles that will be displayed on the widgets, see the sentences that i give the mark. You must look at the sentences with the blue background. In here, you must change by your website condition.
Ok That's all of my explanation about how to create recent post widget. If any questions please contact me by giving comment below. Thanks