[resolved] YES I'VE SEARCHED MY ASS OFF!! - Exclude category, just a DETAIL left?? (3 posts)

  1. Luggruff
    Posted 9 years ago #

    First solution I found, simple one that is, to exclude a category in the sidebar.php is the following:
    <?php wp_list_cats('sort_column=name&exclude=1, 2, 3, 4'); ?>

    I simply used it in this tag:

    <?php wp_list_cats('sort_column=name&exclude=61'); ?>

    like this:

    <li class="sidebox">
    	<h2><?php _e('Pages'); ?></h2>
    	<ul><?php wp_list_pages('title_li=' . 'sort_column=name&exclude=61' ); ?></ul>

    THOUGH!! I get the text "sort_column=name" printed above the categories!! (the category #61 dissapeared like wanted though!!)

    So you see, just a tiny little annoying detail left..

    http://www.luggruff.net/blog <-- see it live.

    Any solution ASAP?! (I'm totally new with PHP and I just took a shot at the "." seperation in the tag!!)

  2. Luggruff
    Posted 9 years ago #

    Ha, SOLVED!! (that was quick for a newbie like myself!!)

    I just wrote &exclude=61 instead of sort_column=name&exclude=61

    (oh forgot.. for you other newbies like me.. 61 is the ID of the category! if you don't know the id, just hover the EDIT button in the [Manage] -> [Pages] page for the category you want to know the ID of, and it will show at the end of the URL in you browser statusbar!!)

  3. Luggruff
    Posted 9 years ago #

    ahh yeah, one more detail, for you that may wonder (Of course I won't let you search YOUR ass of when I can just tell you straight away!! --> to add more categories to the exlude, just seperate by comma.. like such: 61, 55, 2, 45 ..and so on!)

Topic Closed

This topic has been closed to new replies.

About this Topic