WordPress.org

Ready to get started?Download WordPress

Forums

Category Exclude Problem (4 posts)

  1. cucelo
    Member
    Posted 5 years ago #

    Helo friends

    There are some categories on my homepage that I use for the lead picture and some videos. When I exclude them with plugin it also removes the posts related to category.

    But I just want to remove the name of the category

    how am I gonna do that ?

    thanks all

  2. krembo99
    Member
    Posted 5 years ago #

    use exlude arguments in the list_categories inside your template.
    <?php wp_list_categories('exclude=X,Y,Z'); ?>
    where X,Y,Z are your categories,
    for example :

    <?php wp_list_categories('exclude=2,4,6,12'); ?>
  3. cucelo
    Member
    Posted 5 years ago #

    ok krembo thanks, Ill try and tell you ab it

  4. cucelo
    Member
    Posted 5 years ago #

    hello krembo
    I did it like the following and tried some other ways but couldnt manage it, can you help me some more please

    function wp_list_categories($args = '') {
    $defaults = array(
    'show_option_all' => '', 'orderby' => 'name',
    'order' => 'ASC', 'show_last_update' => 0,
    'style' => 'list', 'show_count' => 0,
    'hide_empty' => 1, 'use_desc_for_title' => 1,
    'child_of' => 0, 'feed' => '', 'feed_type' => '',
    'feed_image' => '', 'exclude' => '', 'current_category' => 0,
    'hierarchical' => true, 'title_li' => __('Categories'),
    'echo' => 1, 'depth' => 0
    <?php wp_list_categories('exclude=9'); ?>
    );

Topic Closed

This topic has been closed to new replies.

About this Topic