List Recent Post Blogger Widget - Seoclive

Recent Posts

List Recent Post Blogger Widget

Recent Post Blogger Widget
Recent posts widget tell the latest post that a blogger has shared with the people by ranging them according to their publishing date. Today, in this tutorial we are going to add a blogger website recent post widget with titles and no thumbnail. The recent post widget has numbers and titles as part of the major elements. Follow the below steps to add the list recent post recent post blogger widget.
Steps To Add List Recent Post Blogger Widget
1. Login to your blogger platform and choose your website.
2. click on the layout option on the far left side.
3. Click on add gadget on the sidebar panel.
4. Choose Edit HTML/Javascript and paste the below code in the code box.
<script type=”text/javascript”>
function recentpostslist(json) {
 document.write(‘<ol>’);
 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(‘</ol>’);
 }
</script>
<script src=”https://www.seoclive.com/feeds/posts/default?max-results=2&alt=json-in-script&callback=recentpostslist”></script>
5. Change the URL SEOCLIVE.COM to your own blogger URL.
6. Save and visit your website.




No comments

Powered by Blogger.