I'm using two pieces of code I've found researching the forums and other websites to generate the parent category and the child category of the post I am in within single.php
The problem is with the sub-category code. When the parent category is alphabetically lower than the child category the child displays fine. But if the parent category is alphabetically superior to the child the child displays as the parent category as well.
The code is:
Can you help me out spot what's wrong here?
I need to order it by hierarchy instead of alphabetically somewhere but I have no idea where.