How To: Tell WordPress To Function Like a CMS
So, you have an established WordPress blog, but you’ve seen the pro bloggers doing it and now you want to turn that blog into a Content Management System (CMS)? Many people probably weren’t aware of this trick (including many web developers), but one neat feature added with WordPress 2.1 was the ability to have a different home and blog page without needing to install WordPress on a completely new directory.
In order to accomplish this, you first need to make sure that the page that you want to be your blog’s homepage is named home.php. This will be the page displayed at the root of your domain.
Next, you’ll want to create a new file named blog.php and place the following code within the file:
<?php
/*
Template Name: Blog
*/
// Which page of the blog are we on?
$paged = get_query_var('paged');
query_posts('cat=-0&paged='.$paged);
// make posts print only the first part with a link to rest of the post.
global $more;
$more = 0;
//load index to show blog
load_template(TEMPLATEPATH . '/index.php');
?>
That is all you need for code in that file. Upload it to your theme. This code creates a loop of your index.php file in your theme (commonly used as the single post page) and displays it as a typical blog homepage. Because this page will pull from your index.php file, going forward, any changes you make to your index.php file will update on this page as well.
Now, go into your dashboard and create a new page called Blog. Then select the Blog file you just created in the Page Template drop-down menu in the right sidebar.
Once that is done, the last thing you need to do is go over to your permalink structure page (under Manage) and add /blog/ to your custom permalink structure. This means if you are using an optimal permalink structure, you would want to use a custom structure of /blog/%postname%/. If you are doing this to an established blog, you can easily use the Permalink Redirect plugin to redirect your old permalink structure to the new one.
To see this in action, you can check out my personal blog, Kyle Eslick dot com. If you have any questions, feel free to post them below and I’ll do my best to answer them.
Edit: This was written for WordPress 2.1 through WordPress 2.3.3. It appears that a slight adjustment has been made for WordPress 2.5+. Readers have confirmed that you can find the information you for a WordPress 2.5+ install in this post. If you are using WordPress 2.5 or newer, please keep this in mind if you try this.
WordPress 2.5 Officially Released
I think maybe yesterday the WordPress crew was just trying to throw us off with the release of WordPress 2.5 RC3, because today at WordCamp Dallas, Matt Mullenweg announced that WordPress 2.5 is now available. The fact that the official release coincides with WordCamp almost seems planned. ![]()
Anyway, in order to get your copy, head over to WordPress.org, check out the new redesign, and upgrade your blog software! Then come back here and share your thoughts on the new look and other changes.
WordPress.com users should have the upgrade within a week (though don’t expect it the next few days while the entire team is in Dallas).
Adii Giving Away Premium News All-Inclusive Package
Today Adii of Premium News announced that he is giving away an all-inclusive Premium News theme package (valued at $499.95) for free to one random person that writes a post talking about it. The lucky winner gets all 7 themes for free, as well as a copy of any future themes that are released.
Also in his post, Adii announced that he has completed updates to his original four themes and those that have purchased the theme are entitled to a free update. If you didn’t get an e-mail from him, you’ll want to contact him.
How To: Display The Most Recent Comment First
By default, a typical WordPress blog will display the very first comment at the top of the comments template. While I prefer this way, many others do not. If you are someone that would like your WordPress blog to display the most recent comment on top, Moses of WPThemesPlugin.com explains how to display recent comments on top.
Unlike most of the WordPress hacks we’ve covered here at Hack WordPress, this one is not something that can be controlled from within the WordPress theme. You’ll have to actually go into the comment-template.php file (in the wp-includes folder) in order to make this adjustment. The good news is that it is REALLY easy. Click over to get step-by-step instructions on how to complete this hack. Great work Moses!
WordCamp Dallas Starts Tomorrow
I know I haven’t mentioned it yet, mostly because I am not able to attend. (Can we have one of these in the midwest?)
Anyway, if you live within driving distance of Dallas, Texas, I recommend you check out WordCamp Dallas starting tomorrow. It goes for two days, and most of the big WordPress names will be in attendance.
For more information about WordCamp Dallas, you can check out the official page.
If you are able to attend and would like to share your impressions with our readers, please let us know!















