Is there a way to configure WordPress so that I can have one of my post categories as my home page?
Is there a way to configure WordPress so that I can have one of my post categories as my home page?
Sure - this is pretty easy.
Navigate to you theme's directory. If you have a file named home.php, apply the following changes to it, if not, use index.php.
Put this line of code:
<?php query_posts("cat=2"); ?>
Right before this line in index.php:
<?php if (have_posts()) : ?>
You will want to change the "2" to the Category ID of the category that you want to display posts from.
mrfields is quite right, but to make sure you can use the next/previous page navigation on your homepage after you do this, make sure the line you add is:
<?php query_posts("$query_string&cat=2"); ?>
How do i find the category number?
Go to manage then categories. Then hover over the category link. You will see the category number at the end of the URL on the bottom left of your browser window. (WP 2.5)
mathagat,
You could also try this plugin: Reveal IDs for WP Admin 2.5, which makes the task of seeing IDs in 2.5 simple.
This topic has been closed to new replies.