WordPress.org

Ready to get started?Download WordPress

Forums

Better categories output..? (4 posts)

  1. lamb
    Member
    Posted 10 years ago #

    Currently, you could only display either one category or all your categories in one page..
    is there a way to exclude one or two categories? thanks..
    also for the list_cats.. function.. it appears to have problems too at times..

  2. TechGnome
    Moderator
    Posted 10 years ago #

    I use this at the top of my index.php file to exclude a category:
    $cat = "-7";
    So far it seems to work.
    TG

  3. lamb
    Member
    Posted 10 years ago #

    what does that mean??
    to exclude the 7th cat??

  4. Beel
    Member
    Posted 10 years ago #

    You can exclude one category by placing $cat = "-X"; (where X is the ID of the category to be excluded) at the top of wp-blog-header. Unfortunately, you are limited to excluding one category. Alternatively, you could put something like $cat = " 1 2 4 5 7"; and those categories would be displayed, effectively excluding category 3 and 6.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.