Blogging, Microsoft, Apple Ipod, Mozilla, Google Adsense, USB Drives, Web2.0
WordPress is a very powerful content management system, which is specifically designed as a blogging platform. You can use WordPress as what it’s designed for, a blog, or customize it into a full fledge CMS website with the help of nothing but freely available plugins.
However what’s more common is perhaps you are installing WordPress in a sub-folder of an existing website, and after blogging for a while, you are thinking “Hey, how can I list my blog posts on my homepage?”

It’s really easy actually because WordPress has made life so much easier for us. In order to use any functions in WordPress (such as display latest blog posts, display latest comments, etc), you simply need to include the file “wp-blog-header.php”. For example, to display my latest 10 blog posts in my Flash Games page, I simply put the following few lines of code:
<?php
define(’WP_USE_THEMES’, false);
require(’../wp-blog-header.php’);
query_posts(’showposts=10′);
?><ul>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<li><a href=”<?php the_permalink() ?>” rel=”bookmark”><?php the_title(); ?></a><br />
<?php comments_popup_link(__(’Comments (0)’), __(’Comments (1)’), __(’Comments (%)’), ‘grey’); ?>
<?php endwhile; else: ?><?php endif; ?>
</ul>
Apart from display the latest 10 posts, it also displays the number of comments each post has.
OK, the codes above may look a little gibberish, but the important thing is by including the file “wp-blog-header.php”, you will have access to all the WordPress functions in an instant!
Wonderful isn’t it? With this you can easily integrate WordPress into your existing website and make the website easier to update by making use of WordPress CMS capability.
larry
June 11th, 2008 at 12:26 pm
nice article dude. We love to use WordPress too and combine with our own website.
ahyuen
June 12th, 2008 at 12:29 am
Good !. Please post more of wordpress thingy.
Kitkat
June 12th, 2008 at 2:58 pm
Larry,
Glad you like the article. I guess this is a nice tip for people looking at integrating their site with WordPress.
Ahyuen,
Sure, I will - when ideas and inspirations strike.
turbo
June 26th, 2008 at 10:07 pm
Hello, i really enjoy your post couldn’t understand it. Can you help me integrate mine? please!!!! You can refer to my mail address for response. thanks
Murray
July 16th, 2008 at 11:46 am
I have an existing site and i want to have a news and events section on the home page with ten most recent entries. I want the user to be able to generate the news items themselves without having to touch the actual html webpage. This sounds like a possible approach for my situation. Do you have any advice or tips?
Thanks
WEez
July 19th, 2008 at 12:39 pm
Hello, I enjoyed your information. I have been reading up on this intergration for a while. I am still a noob.
Like Murray I want to have a blog section set up with just the last 10 entries listed, with out any other links or actions available on that page.
Would you please take a moment and help me out a bit? You may contact me via email.
Thank you very much.
Kitkat
July 21st, 2008 at 6:42 pm
Turbo, Murray and WEez,
I thought I have listed what you need to do fairly clearly in my article? Hmm… at what point you are stuck?
What error message you are getting?
Furious Photographers
August 2nd, 2008 at 12:41 am
You’re awesome man! I have been trying to find something like this for my wedding photography blog/website. Thanks!