WordPress.org

Ready to get started?Download WordPress

Forums

Parent and Child Nesting Problem in Categories (4 posts)

  1. eastbayinsomniac
    Member
    Posted 6 years ago #

    I changed the theme of my site and the nested Categories un-nested and now show only child, not parent. For instance, my site should look like:

    HUNGRY?
    American Food
    Chinese Food
    THIRSTY?
    Coffee
    Beer

    I have HUNGRY? and THIRSTY? set up as parents of children in Categories. For the posts, I checked the boxes next to the children (not the parents). Using the previous theme, the Categories sidebar showed up as above. In this theme, I only get the children: http://www.eastbayinsomniac.com (under construction, sorry). As an experiment, I checked the box in one post next to one parent and now that shows up in the list, but out of order.

    Can anyone advise what file and what code to edit to get the parents to show up with the children indented?

    This is a website using the same theme (mandigo) where you can see under Category (Kategorier) what I would like to do: http://sonybmg.se/

    I've just been reading through the forums for this topic and I've tried to read these two from the wordpress codex:

    http://codex.wordpress.org/Styling_Lists_with_CSS
    http://codex.wordpress.org/CSS_Troubleshooting#The_CSS_Parent_and_Child_Relationship

    It seems that a version of this has been asked before, but I am sorry to say I don't really understand the code.

    Could you point me in the direction of what file needs to be edited and where? Thank you!

  2. JeremyVisser
    Member
    Posted 6 years ago #

    The problem you're having is most likely that you're using the category sidebar widget, which doesn't have showing hierarchy enabled by default.

    To fix:

    1. Go into WP Admin → Themes → Widgets
    2. Click the "Configure" icon next to the Categories widget
    3. Tick the "Show hierarchy" box
    4. Don't forget to hit "Save Changes".

    Hopefully that will have solved it.

  3. eastbayinsomniac
    Member
    Posted 6 years ago #

    Yes, thanks that exactly solved the problem. Now that I have that, I am wondering if there is a way to re-use the Categories widget drop-down menu such that I could have a handful of drop-down menus per each Parent Category with the children inside (instead of one drop-down menu with the parent/child hierarchy within)? Would I use the category ID to differentiate?

  4. JeremyVisser
    Member
    Posted 6 years ago #

    Hmm, that's going to be a little difficult to do, and you would need to write your own version of the category widget. I'll see what I can whip up.

Topic Closed

This topic has been closed to new replies.

About this Topic