Support » Fixing WordPress » do NOT display some categories on 1st page

  • hello…

    Let’s say I have 5 categories:

    cat1 – cat2 – cat3 – cat4 – cat5

    and I would like that articles that I publish in cat 3 and cat5 to not appear on my wordpress. I only want to see those articles when I go on the category.

    Is it possible? if it is [and i’m sure it ie :p] how can I do it?!?


Viewing 5 replies - 1 through 5 (of 5 total)
  • There are probably more ways to do it, but one that comes to my mind is in the loop adding 2 conditionals:

    if (!is_category) then if (!in_category(‘3’)) { display post }
    else { display post }

    i’ve tried this, but didn’t know exactly where to add this 🙁

    on my index.php (the template is Tropical_Grunge) i have:


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

    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h3 class=”storytitle”><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/post.gif” alt=”post”> ” rel=”bookmark”><?php the_title(); ?></h3>
    <h2><?php the_time(‘j F Y’) ?></h2>

    <div class=”meta”>by <?php the_author() ?> @ <?php the_time() ?> <?php _e(“. . . category:”); ?> <?php the_category(‘,’) ?> <?php edit_post_link(‘ (Edit)’,”,”); ?> </div>

    <div class=”storycontent”>
    <?php the_content(__(‘(more…)’)); ?>


    where should I add and what ?!? 🙁

    thanks for the link tptboy

    i did that, but when I click NEXT PAGE i see the first page again 😐 and in the footer I see PREVIOUS PAGE (so it really changes the page)

    Tyr this plugin:

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘do NOT display some categories on 1st page’ is closed to new replies.