I am working on a WP 3 driven site and what I'm trying to do is use the "Posts" functionality to control different pages.
I have 3 categories, news, events and mixes and I have used category-X.php files to control the events and mixes pages. When I want to do is use WP blog capabilities (index, archive and single) ONLY for the news category (not for events and mixes).
Can this be done with the new loop capabilties or do I need to get dirty with queries.
If anyone is providing code answers then the news category id is "4".
PS. here is a link to the site in progress news category : [[LINK href="http://floorplay.gunkdesign.co.uk/news"]][[/LINK]]
Merne Asplund answers:
you can just change your query in your index, archive, and single. Add this above your loop if a query posts isnt already there. Change the "News" part to whatever you called it.
<?php query_posts('category_name=Staff Home'); ?>
<strong>ALSO</strong> If you want to use your cat ID:
<?php query_posts('cat=4'); ?>
Joe Jenkins answers:
In your code on either index.php or home .php, you will find the following:
You may have something further in there, such as:
That number could be anything.
What you need to do is the following:
the XXX would be the category ID you wish to use.
If there is soemthing else in there, then do it as folows:
Cosmin Popovici answers:
You just need to delete your category-news.php file.
That way, News will be displayed with the standard index.php or category.php or archive.php, while the other categories will still have their own templates.