Title: excluded categories?
Last modified: August 18, 2016

---

# excluded categories?

 *  Resolved [minushka](https://wordpress.org/support/users/minushka/)
 * (@minushka)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/excluded-categories/)
 * I’ve been trying a number of plugins and coding to exclude one category from 
   my frontpage, but nothing seems to work. Either nothing happens, or the entire
   site goes beserk. Anyone know something that actually does work?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Adam Brown](https://wordpress.org/support/users/adamrbrown/)
 * (@adamrbrown)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/excluded-categories/#post-661029)
 * Have you played with [query_posts](http://codex.wordpress.org/Template_Tags/query_posts)?
 * Something like this in your index.php would put a different set of posts on the
   front page as elsewhere:
 *     ```
       <?php
       if (is_home()){
         query_posts( ... put something here ... );
       }
       ?>
       ```
   
 *  [Adam Brown](https://wordpress.org/support/users/adamrbrown/)
 * (@adamrbrown)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/excluded-categories/#post-661030)
 * also:
 * [http://wordpress.org/extend/plugins/advanced-category-excluder/](http://wordpress.org/extend/plugins/advanced-category-excluder/)
 *  Thread Starter [minushka](https://wordpress.org/support/users/minushka/)
 * (@minushka)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/excluded-categories/#post-661073)
 * adamrbrown, I’m not sure I understand what you want me to put there…
 * And I tried that plugin. Nothing happened :S
 *  [ehab](https://wordpress.org/support/users/ehab/)
 * (@ehab)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/excluded-categories/#post-661077)
 * If you want to exclude some catagories in your home page then use the following
   code
 *     ```
       <?php
          if (is_home()) {
             query_posts("cat=-1,-2,-3");
          }
       ?>
       ```
   
 * is_home = checks if it is your home page
 * query_posts = searches the database for the given parametres. which is to exclude
   categories, 1,2,3
 * Please go [here](http://codex.wordpress.org/Template_Tags/query_posts) and read
   the whole page for better love.
 *  Thread Starter [minushka](https://wordpress.org/support/users/minushka/)
 * (@minushka)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/excluded-categories/#post-661083)
 * I read that section too, and tried, but it doesn’t say where in the index to 
   put the code, I _must _have put it wrong because it messed up a whole lot 😛

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘excluded categories?’ is closed to new replies.

 * 5 replies
 * 3 participants
 * Last reply from: [minushka](https://wordpress.org/support/users/minushka/)
 * Last activity: [18 years, 4 months ago](https://wordpress.org/support/topic/excluded-categories/#post-661083)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
