Forums

Problem with Child Categories (3 posts)

  1. chriscoyier
    Member
    Posted 7 months ago #

    Having a bit of trouble with child categories. I'm using them on a Custom Post Type, if that's relevant.

    Correct setup of categories: http://cl.ly/AxC3

    Just before clicking the button to add a new category to a parent category: http://cl.ly/AwtP

    Just after, doesn't add to parent: http://cl.ly/AxQk

    If you give both the new category and the parent category, it removes all the other children: http://cl.ly/Awy0

    It's not just cosmetic either, with both the parent and child selected, it outputs them via the_category() as both top-level categories: http://cl.ly/AwRS

  2. clutters
    Member
    Posted 7 months ago #

    What you're seeing is the default behavior.

    In the Dashboard, when choosing a category, it moves the selected ones to the top -- often hiding the parent-child relationships.

    Using the_category() is shows a list of all the categories in a list, without making sub-lists for child categories. (Although you can get the parent category to preface the child in the list ("Parent Child") using the_category('','multiple'); or the_category('','single');

    If you want to do something more complex with the display, try doing something with get_the_category_list()

    What are you trying to get them to do?

  3. chriscoyier
    Member
    Posted 7 months ago #

    I managed to get done what I needed to do... but, this seems particularly broken: http://cl.ly/Awy0

    To show child categories as top level just straight up seems like a bug. Or am I crazy?

Reply

You must log in to post.

About this Topic