WordPress.org

Ready to get started?Download WordPress

Forums

Help using list_cats (7 posts)

  1. eveums
    Member
    Posted 8 years ago #

    Here's what I'd like to do: I'd like for child subcategories to appear under their parent in the sidebar.

    Example:
    Parent
    ---> Child
    ---> Child

    I've done some research, and I'm having confused as to whether this is a CSS issue or a wp_list_cats issue.

    Here is my list_cats argument:
    <li><h2><?php _e('Categories'); ?></h2>
    <ul>
    <?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>
    </ul>
    </li>

    I think it's set to display child categories... but they're still not moved under the parent.

    If this is a CSS issue, can someone point me to what class I'm looking for in the stylesheet? BTW, I'm using the Wuhan theme.

    THANKS A MILLION for any help!!!!

  2. First, wp_list_cats is a LOT easier to use as you can just configure what you want:

    http://codex.wordpress.org/Template_Tags/wp_list_cats

    And this is what I have on my blog:

    <?php wp_list_cats('sort_column=name&optioncount=1&hide_empty=0&hierarchical=1'); ?>

    The result is here: http://www.viper007bond.com/

  3. eveums
    Member
    Posted 8 years ago #

    Thank you for the suggestion. I like the way that your sidebar is organized. I tried the code you suggested, and it broke my sidebar's look bigtime! :( I will need to investigate a little further on what's going on... Thanks for the help!!

  4. eveums
    Member
    Posted 8 years ago #

    OK, I'm completely confused. When I use this argument:
    <?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','', 0); ?>
    the Categories of my sidebar become very broken. The two "children" categories are missing, as is one of the parents [but only one - the other parent is still there]. Also, the font spacing seems to get messed up, and there are lines running through the text.

    Could this be a CSS problem?

  5. I tried the code you suggested, and it broke my sidebar's look bigtime!

    Try this:

    <ul>
    <?php wp_list_cats('sort_column=name&optioncount=1&hide_empty=0&hierarchical=1'); ?>
    </ul>

  6. eveums
    Member
    Posted 8 years ago #

    Viper, Thanks again for the suggestion. I had the same problem occur as before (The two "children" categories are missing, as is one of the parents [but only one - the other parent is still there]. Also, the font spacing seems to get messed up, and there are lines running through the text.) I'm guessing it must be some screwy CSS issue, as the code looks fine.

  7. A link to your site would help us fix it. ;)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.