Jul 252009
Well, I have to go through a situation as follows…
The blog is installed in the subdirectory of a website, like I have done for this site..
But in the sidebar of the index page in the main site, the excerpts of blog posts need to appear…
The following code helped me to do it…
// Include WordPress
define('WP_USE_THEMES', false);
require('./wordpress/wp-blog-header.php');
query_posts('showposts=2'); //Write the number of posts you want to display
while (have_posts()): the_post(); ?>

Twitter
LinkedIn