WordPress.org

Ready to get started?Download WordPress

Forums

Hierarchical categories (5 posts)

  1. catowner
    Member
    Posted 10 years ago #

    I'm trying to display an hierarchical listing of my categories but I can't figure out how to do this. I've been playing with the parameters but it doesn't work.

    Currentlly it looks like this: <?php wp_list_cats('children=1&optioncount=1&recurse=0'); ?>
    Any suggestions for how I can do this?

  2. NuclearMoose
    Member
    Posted 10 years ago #

  3. catowner
    Member
    Posted 10 years ago #

    Yes, and as far as I understand the parameters above should make an hierarchical listing but ...

  4. Michael Adams (mdawaffe)
    Member
    Posted 10 years ago #

    The very code works for me. What is it doing that you think it shouldn't? Or what isn't it doing you think it should?

    The reason I ask, is that if it's just displaying what looks like a flat list, it could be a CSS issue. Take a look at the HTML code your browser gets and see if you really do/don't have nested lists.

  5. catowner
    Member
    Posted 10 years ago #

    I just checked and the HTML code only contains the categories that don't have any subitems. So apparently some kind of filtering of the subject is being done ... ahhhh .... the solution is the 'hide_empty' option. Since my top-level categories are empty they, including the children, are hidden.

    Now it works.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.