WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How to exclude categories from main menu, include in widget

[Resolved] How to exclude categories from main menu, include in widget

  • 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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    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.

    Thanks,

    Shane G.

    Thanks! That will solve the problem!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] How to exclude categories from main menu, include in widget’ is closed to new replies.
Skip to toolbar