do NOT display some categories on 1st page (6 posts)

  1. chris-T33
    Posted 9 years ago #


    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?!?


  2. TwoMotifs
    Posted 9 years ago #

    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 }

  3. chris-T33
    Posted 9 years ago #

    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 ?!? :(

  4. Bryan Davis
    Posted 9 years ago #

  5. chris-T33
    Posted 9 years ago #

    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)

  6. moshu
    Posted 9 years ago #

    Tyr this plugin: http://ryowebsite.com/?p=46

Topic Closed

This topic has been closed to new replies.

About this Topic