How To Create A Specific Label Widget Without Thumbnails

When you come to blogger blog, widgets are the most important for navigation of your website. In blogger you can create your own widgets with your own code. And you can add social media plugins through widget, you can add advertisement to widgets, so widgets are always more important for blogger blog. In blogger HTML/JavaScript Widget will help you to add HTML program and JavaScript. Using this widget you can manually add your functionality to the blogger blog.

Here I'm going to tell how to create a specific label widget without thumbnails. In this label widget you will get blog posts associated with that label.

Step 1: Login to your Blogger Blog.

Step 2: Select Layout Section. Click Add Gadget link and you can see list of widgets.

Step 3: From widgets list select HTML/JavaScript Widget. Using this you can add your own functionality to your blog.

creating a specific label widget without thumbnails
Step 4: In HTML/JavaScript window you can see Title box and content box.

add your title to this section and html code to content box

Step 5: In title box add your widget title. In Content box add the below code.

<!--Posts by Specific Label Start -->
<style>
ul li {
display:block;
}
</style>

<script type="text/javascript">
function recentpostslist(json) {
 document.write('<ul>');
 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('</ul>');
 }
</script>

<script src="http://www.earnviablog.com/feeds/posts/summary/-/Blogging?max-results=5&alt=json-in-script&callback=recentpostslist"></script>
<!--Posts by Specific Label End -->

Step 6: Click Save Button and Click Save arrangement. Now refresh your blog.

That's it. You are done with the specific label post widget.

All the best!!!

No comments:

Post a Comment