• Hi – I have a tv show blog where I provide episode summaries and reviews. I obviously use the normal generated category list to display all the show s and their different seasons. I’d also like to add a site news category and a tv news category. I do not want them listed in the same list as the tv show category.

    Is there anyway I can exclude certain categories from the default category list? I’d add the excluded categories somewhere else, hard coded.

    Thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter nando99

    (@nando99)

    I see… i have a problem though.

    I’m using the code below to only show the parent categories and the child categories when inside the parent category:

    <div class="sideblock">
    <h3>Shows</h3>
    
    <ul>
    
    <?php
    $defaults = array(
    'show_option_all' => '',
    'orderby' => 'name',
    'order' => 'ASC',
    'show_last_update' => 0,
    'style' => 'list',
    'show_count' => 0,
    'hide_empty' => 0,
    'use_desc_for_title' => 1,
    'child_of' => 0,
    'feed' => '',
    'feed_image' => '',
    'exclude' => '',
    'hierarchical' => true,
    'title_li' => '',
    'echo' => 1,
    'depth' => 1
    );
    
    wp_list_cats($defaults); ?>
    
    </ul>
    
    </div>

    How do I add what I need to add to wp_list_cats($defaults);? I tried wp_list_cats($defaults&exclude=20); and that gives me an error.

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Exclude certain categories from the category list’ is closed to new replies.