Displaying multiple blog pages in same wordpress blog

So this is the scenario… I have a website that is powered by wordpress. I have two different pages/views that should both be presented as blogs. The thing is WordPress haven’t yet come up with this feature. WordPress works such that there is one main BLOG and the others are just pages. The pages only contain a title and the content whereby a user can leave a reply to the content.

There are solutions for this tiff we find ourselves in. Some talk of WordPress MU which is a special implementation of WP. Google it up and try it out if you can. I didn’t have the time to delve into that solution since it needed fresh installation of an implementation I am not familiar with.

I found a brilliant and crafty solution for what I wanted. The use of categories and pages.

All you need to do is add this code before your WordPress loop.. in my case.. in the content.php file.. in yours you might have used page.php.

$catID = 0;

if (is_page(‘stories’)) {

$catID=3;

} elseif (is_page(‘about’)) {

$catID=0;

}

elseif (is_page(‘contact’)) {

$catID=0;

}

if ($catID) {

$paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;

query_posts(“cat=$catID&paged=$paged”);

} ?>

All I’m doing is associating each page with a category ID. There are elaborate ways of obtaining this ID but I used the juvenile way because I’m a self confessed WordPress rookie ;-D Once you’re logged in your WordPress dashboard, go to Manage and then in Categories. Simply put your mouse cursor on the “edit” link related to the category you want to know the ID and look on your browser’s status bar.

Yeah.. noob.. i know :-D… but heeey! I rarely work with wordpress and it works for me. Aaaaanyway! Category ID 0 means that this page should not be viewed as a blog and will just be displayed as a normal page. For the stories page(in my example above), WordPress will instead get all the posts belonging to the category with ID of 3 and display them instead of a normal page.

Hope this works for you. For me it didn’t display the edit and comments link so if you find out how to fix that let me know. Cheers!