This post will explain the proceedure to show posts only from specifc or multiple categories on your WordPress home page.
Enter the Admin section of your WordPress site then go to the Appearance => Editor =>.
From the right select home.php (if it exists) or index.php (if home.php does not exist).
You will want to add code directly above “The Loop”
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
I have found several ways to do this but only a few have worked for me. I will list them below.
I have found this to be the most reliable way of doing this. I have revised this post and removed the others.
<?php if (is_home()) {query_posts("cat=1");}?>
If you dont want to show posts from a specific category simply change the code to negative category
<?php if (is_home()) {query_posts("cat=-1");}?>
For more information on showing specific categories and even specific posts on the home page please check out the following link.
WordPress Query Posts
If you would like to show 2 or more categories and keep a specific category or post on top please see this link.
Word press multiple loops
Here is an example using multiple loops on your home page
Add
<?php $temp_query = $wp_query; ?><br>
<?php if (is_home()) {query_posts("cat=1");}?>
Above
<?php if (have_posts()) : ?>
Find the first
<?php endif; ?>
Then below it add
<?php $wp_query = $temp_query; ?>
Related posts:
- WordPress – Sticky a Post on the Homepage I will explain how to keep a post on the top of your homepage for those of you who want to keep a welcome to my blog style post first on your home page. It’s extremely easy and your going to kick yourself after I tell you how to do...
- WordPress wp_get_archives from specific category ? While trying to figure out how I could show posts from two categories but always keep one category on top I finally gave up. The best I could find was to run multiple custom queries using rewind_posts() but even this was difficult to carry from theme to theme as I...
- WordPress Using rewind_posts() to show multiple Custom Queries I searched for a while on how to do this and finally think I figured it out but it still needs to be tweaked. First you need to create your custom queries, I have created 2 here which pull from different categories. I searched for a while on how to...
- WordPress show Post Excerpts + Thumbnails This article will show you a couple methods for showing excerpts from posts on the homepage, for searches and for archives. First I will show you the manual method of editing the WordPress theme code to accomplish this but I urge you to read on as their is a much...
- WordPress create a custom Sidebar Posts Query I have been trying to learn how to make my own custom WordPress sidebar widgets because every theme uses their own custom layout and I prefer a specific layout which I can only acomplish by manually editing the WordPress theme sidebar PHP file. In this post I will show you...

