Forums

I want some blogs to show only on specific categories, not on first page (2 posts)

  1. sbfine1
    Member
    Posted 2 years ago #

    I have a WP blog website hosted by a hosting service. The url for this site is http://www.thespiritmaven.com. (Even though the url is a .com, the site actually uses wordpress.org.)

    I want to post blogs to specific categories and NOT have them show up on the first page. I would like them to show up ONLY when the reader clicks on that specific category in the navigation bar. Right now, it also shows on the first page.

    Is there any way I can confine specific blogs to their intended categories?

    Steve

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Use the category__not_in argument with the template tag, query_posts(), in your index.php just before The Loop. Something like:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args=array(
       'category__not_in' => array(1,4,5),
       'paged'=>$paged
       );
    query_posts($args);
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic