• I’m about to edit all of my categories but I want to alter the way they’re displayed in posts so that child categories follow their parents.

    i.e. Writing: Editing, Research, Politics: War, Racism

    ..at the moment they seem to be ordered based on what data I added the category.

Viewing 1 replies (of 1 total)
  • If you use the the_category to display categories then you can use the parents argument of multiple. Example

    <?php the_category(', ','multiple') ?>

    Just as a note, by WordPress standards, ANY category that has been designated a Parent category is not meant to be checked in the category hierarchy when writing posts. Meaning, only the latest generation category should be checked. Think of it like this, only the youngest generation gets the action.

    It’s okay to have multiple categories assigned a post, as long as the other categories are not designated as parents.

Viewing 1 replies (of 1 total)

The topic ‘Ordering categories’ is closed to new replies.