Improved Headlines Widget for Blogger Blogs

 

As mentioned in a previous post, adding a headlines widget to your web page is a cool and easy way to let your readers know at a glance what your recent blog entries are about. It is also a good way to attract attention and to encourage the reading of recent posts.

Code

<script style='text/javascript' src='http://blogergadgets.googlecode.com/files/recentpostswidgetv1.js'></script><script style='text/javascript'>var numposts = 5;var showpostdate = true;var showpostsummary = true;var numchars = 90;</script><script src='http:// YourOwnBlog.blogspot.com /feeds/posts/default?orderby=published&alt=json-in-script&callback=showrecentposts'></script>

Installation

1. Sign in to your Blogger Dashboard --> Design --> Page Element --> Add a Gadget --> HTML/JavaScript.

2. Copy and paste the code into the new HTML/JavaScript.

3. In the code, look for the line:

…src=”http://YourOwnBlog.blogspot.com/feeds/posts/default….

and replace the blog address (shown in color blue below) with your own blog address:

…src=”http://YourOwnBlog.blogspot.com/feeds/posts/default.…

For self-hosted blogs:

…src=”http://www.YourOwnBlog.com/feeds/posts/default….

4. Add a title (optional).

5. Save.

Layout

Headlines are usually placed at the top of the web page. For your Blogger blog, go to your blog’s Design page, drag your Headlines Widget and place it above the Blog Posts box. Do not forget to click SAVE!!

Customization

You can change the number of posts shown by changing the value in green.

If you do not want the post date to be shown change var showpostdate = true to var showpostdate = false.

If you do not want a summary of your posts to be shown change var showpostsummary = true to var showpostsummary = false.

You can change the number of characters shown in the summary by changing the value of var numchars = 90 (between 80 – 120 is recommended).

Good luck!

 

Related articles:

Recent Posts Widget for Blogger

Recent Posts Widget with Thumbnails for Blogger

0 Comments:

Post a Comment