WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Sort the_category not alphabetical but by parents and children

[Resolved] Sort the_category not alphabetical but by parents and children

  • addictable
    Member

    @addictable

    If you take a look at http://addictable.de/, you can see that the categories that an article are published in are displayed below the title. I’d like the output to be sorted by parents and children.

    For example: “Seelen”, “Warm Bodies” and “Die Tribute von Panem” are all children of “Filme”. So the correct output should be “Filme | Seelen”, “Filme | Warm Bodies” and “Filme | Die Tribute von Panem”.

    On the first two articles, the output is alright, because I guess that the categories are sorted alphabetically. But as “Die Tribute von Panem” starts with a D and “Filme” starts with a F on the third post, the output is not correct.

    Could you tell me where to change/add the code so that “the_category” is sorted hierarchically and not alphabetically?

    I’ve been looking for a resolution for a while now and I can’t find one anywhere. Thanks! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Sort the_category not alphabetical but by parents and children’ is closed to new replies.