Support » Fixing WordPress » How do I separate out categories?

  • Resolved theresse

    (@theresse)


    I’m trying to figure out how to separate out the list of categories that is displayed on the call for categories. I’m currently using this….

    <?php wp_list_cats(‘sort_column=name&optioncount=0’); ?>

    Is there a way to create 2 or 3 separate lists of categories in the same manner displaying only specific category ID’s that could be separated out and add titles to that part of the list?

    For example, I have 3 categories that I want separated out so I can put in a title to those categories separate from the full list of categories in my sidebar. I can specify those 3 by ID but not sure how to make that work with the php call?

    Categories

      Resources

    • blah blah
    • blah blah
    • blah blah
    • >

      Services

    • blah blah
    • blah blah
    • blah blah

    then the rest of the list of categories below….

    I’m putting the list of categories in a floating box rather then in a sidebar so I would rather code it then use a widget…

    Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I found a good resource on another website and was able to break down the category lists into separate sections using the following code:

    <?php wp_list_cats(‘optioncount=0&child_of=37&sort_column=name’) ?>

    Where (the child_of=37) will list all of the children of category 37. I went through and made parent categories for the sections I wanted and then edited my categories to refer to their parents. This way I can call the parent and have the child listed and create a new “call” for each section I want. Works great.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do I separate out categories?’ is closed to new replies.