Support » Fixing WordPress » adding a category menu bar & excluding some categories

  • Hi everyone,

    I have just changed theme on my blog & would like to add a menu bar under the header image, for categories. This in itself is not a problem and I managed to get it done. However I then decided to try and exclude certain categories eg. Uncatergorized,Featured & Welcome this is where I now have a problem !
    ———–original code————————
    <?php wp_list_categories ('sort_column=menu_order&title_li'); ?>

    I tried changing the original line of code above with;

    <?php wp_list_categories('orderby=name&exclude=1,28,32'); ?>

    But then instead of having a horizontal menu, it just gave me the word “Categories” as a drop down menu, although the 3 categories I want to remove were not in the drop down menu, so I have made some progress.

    Can someone please help me out on this as I don’t know enough about php at the moment & whatever I try I just keep getting syntax errors.


Viewing 3 replies - 1 through 3 (of 3 total)
  • <?php wp_list_categories('title_li=orderby=name&exclude=1,28,32'); ?>


    I have a similar problem. I would like to put a collapsible category list (with subcategories) on my menu bar where I now have just the pages listed.
    I installed Robert Felty Collapsing Category but that did not work and even if it did I would only know how to show those categories on the sidebar.

    Please help with baby steps.



    This is what I put in and it worked perfectly:

    <?php wp_list_categories (‘sort_column=menu_order&title_li&exclude=1,20’); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘adding a category menu bar & excluding some categories’ is closed to new replies.