• Hi there, I’m having a little trouble with excluding an category from my sites archive pages and would be very grateful if some one could help me out.

    First of all, I have excluded a category from the category and have it as a separate link in my side bar.

    Code used:
    <li><?php wp_list_cats('sort_column=name&optioncount=0&hierarchical=0&exclude=10'); ?></li>

    Secondly, I have excluded the the category from the latest work area. This now lists work from the pages/cats in the main pages.

    Code used:

    <ul><?php $temp_query = $wp_query; query_posts('showposts=10&cat=-10'); ?>
    <?php while (have_posts()) { the_post(); ?>
    
    <li><a>" rel="bookmark" title="Permanent Link to &ldquo;<?php the_title(); ?>&rdquo;"><?php the_title(); ?></a></li>
    <?php } $wp_query = $temp_query; ?> </ul>

    Last but not least, The excluded category appears on the archive pages, along with the rest of the content I actually want on there.

    How can I exclude the category from the archive pages?

    Thanks for your help

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Exclude Archive Help’ is closed to new replies.