• I have 4 categories and at present when you go to my site it shows all 4 categories posts. What I want to know is how to make my “family” category be the default my site opens up to and show only my post tagged with the family category instead of all 4.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi – you need to edit your theme’s index.php file

    it is found in /wp-content/themes/{theme-name}

    In that file, find lines that will look something like this:

    <?php if (have_posts()) : ?>
       <?php while (have_posts()) : the_post(); ?>

    Just before them, add these lines:

    <?php if ( is_front_page() ) {
             query_posts("cat=1");
          }
    ?>

    You must find out what the category ID code for your family category is, and use that number instead of “1” in the query_posts line.

    On the Manage Categories page in the WP admin section, point at the name Family, and look at your browser’s status bar in the lower left corner. You will see a URL, and the last part of that URL will say &cat_ID={a number} the number is the category ID – use it instead of the 1 I put in my example.

    Thread Starter vtupola

    (@vtupola)

    Thanks for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Default Categories’ is closed to new replies.