WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can't display child categories properly (6 posts)

  1. raygene
    Member
    Posted 6 years ago #

    Hi,

    What do I need to do to have the child categories display properly under the assigned parent category?

    I'm using the "standard" Kubrick theme and my parent and child categories show like this (example):

    1- Pies
    2- Cakes
    Apple
    Cherry
    Chocolate
    Vanilla

    (I numbered the cats so they'll show in the order I wish)

    Whereas I would like this categories order:

    1- Pies
    Apple
    Cherry

    2- Cakes
    Chocolate
    Vanilla

    Is this a template flaw or a program bug?
    Is there a fix for this?

    Thanks,
    Gene

  2. theapparatus
    Member
    Posted 6 years ago #

    Could you kindly open you your theme's sidebar.php file, look for a bit of code that mentions categories (probably 'wp_list_categories') and copy and paste it here please inbetween backticks? That's the key above the tab yet and to the left of the '1' key on a standard pc keyboard.

    I ask that as from looking at the default theme, it should be doing that already.

    Reference by the way:

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

  3. raygene
    Member
    Posted 6 years ago #

    There you go, hope this helps...

    <?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>

  4. raygene
    Member
    Posted 6 years ago #

    Is there a way to accomplish this?

    Out of curiosity, I installed b2Evolution and tried the above and it does show the child categories under the parent.

    I'd love to use WordPress though...

    Gene

  5. raygene
    Member
    Posted 6 years ago #

    Anyone?

    Thanks,
    Gene

  6. raygene
    Member
    Posted 6 years ago #

    Never mind, fixed it...

    Didn't tick the "Show Hierarchy" in the Categories Widget.

    Duhh...

    Gene

Topic Closed

This topic has been closed to new replies.

About this Topic