[resolved] How to exclude categories from main menu, include in widget (3 posts)

  1. thomass68
    Posted 6 years ago #

    I like to exclude some categories in the main navigation bar, but NOT the post in the excluded categories. Some of the excluded categories i want to include in a category-widget in the side bar. Does anyone knows a solution of this problem? I tried many plugins but non of them will work like i discribed as above.

    I use Visual Categories 1.6.0 Settings for the widget and that works fine. No i'm looking for a good plugin to manage the apparence of the main navigation bar.

    Btw, the plugin Hide Categories don't work on wp2.8.4. When i choose one or more categories to exclude, the won't dissapear!

  2. Shane G
    Posted 6 years ago #


    Usually the categories on the menu can be found at the header.php file in your theme folder.

    Find this:

    <?php wp_list_categories('title_li=') ?>

    Replace with:
    <?php wp_list_categories('exclude=6,43&title_li=') ?>

    This will exclude category 6 and 4 from the list. But you can change the category ID according to your requirement.


    Shane G.

  3. thomass68
    Posted 6 years ago #

    Thanks! That will solve the problem!

Topic Closed

This topic has been closed to new replies.

About this Topic