Ads

Attach recent post with javascript

Recent Post very important function for blog visitors to see the latest posts on our blog. This recent post script code I get from the blog's Kang Enes which I also put this on my blog and my friend can see an example of what I mean recent post on the sidebar
of this blog and on blogs that there is here. Because I think such posts are very good so there is no harm to my post back on my blog so many bloggers who know how to install and to follow these steps:

1. Sign in to Blogger.com.
2. Click the Layout menu.
3. Click Add a Gadget, select for Html/Javascript.
4. Copy the code below and paste it on the box that appears.

<script style="text/javascript" src="http://sites.google.com/site/ruangsc/enes/rc-posts.js"></script>
<script style="text/javascript">
var numposts = 10;
var showpostdate = false;
var showpostsummary = false;
var numchars = 100;
var standardstyling = true;
</script>
<script src="http://your blog name.blogspot.com/feeds/posts/default?orderby=published&alt=json-in-script&callback=showrecentpos ts"></script>


5. Completed, save it and see the results.

Description of the variables the script above:
*. Numposts = 10; means that 10 posts are shown.
*. Showpostdate = false; means the date of this post is not displayed if the date of posting to be displayed to change the word false with true.
*. Showpostsummary = false; meaning summary post is not displayed.
*. Numchars = 100; means many characters (letters) for a summary post that is displayed is 100 characters.
*. Standardstyling = true; means using the standard type. The script code using a bullet but if the bullet does not appear can add commands <ul> about </script> dan <script style="text/javascript">. And at the end of the script to add </ul> as a cover so that the code in the above command will be like this:

<script style="text/javascript" src="http://sites.google.com/site/ruangsc/enes/rc-posts.js"></script>
<ul>
<script style="text/javascript">
var numposts = 10;
var showpostdate = false;
var showpostsummary = false;
var numchars = 100;
var standardstyling = true;
</script>
<script src="http://your blog name.blogspot.com/feeds/posts/default?orderby=published&alt=json-in-script&callback=showrecentposts"></script></ul>


See and the precise difference code above. One more if my friend wants to put recent post under the posts following way:

Click the Edit menu and do not forget to check Html small box beside writings expand widget template, if it has been looking for the following code:

<p><data:post.body/></p>

If you have found a copy code above and place it under the code <p><data:post.body/></p>

Done buddy save the template and see the results. Good luck!