Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to use a category page as the home page of my blog. Is that possible and how can I do it? It tried it with a .htacces rewrite rule but that didn't worked.

share|improve this question

3 Answers

up vote 2 down vote accepted

Category page can't be home page (just doesn't work like that).

There are two other options:

  1. Limit home page to posts from specific category (close but not the same thing).
  2. Redirect home page to actual category page.

Since you seem fine with redirect try following. Create home.php template in your theme directory with following content:

<?php
wp_redirect( 'http://www.yoursite.com/category/category-slug' );
?>

There is probably some more tidy way to do this with hooks, but nothing I can think of right now.

share|improve this answer
Thanks, that's what I was searching for. WP should really document all those special PHP files better (like the maintenance.php). – Kau-Boy Sep 15 '10 at 18:59
Just be aware that this almost doubles server load for home page. WP core runs twice. Might be important factor if you have decent amount of visitors. – Rarst Sep 15 '10 at 19:06

The most semantic way to do this instead of using a redirect (extra connection time) is to create a custom page template.

new page:

/* Template Name: New Homepage by Cat */

<?php query_posts('cat_id'=>'3');?>
<--insert loop-->
share|improve this answer

just add a category filter into your index.php query in your template. simples

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.