Support » Plugins » Retrieving parent and child category in single.php – bug, need help

  • Hello everyone,

    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:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    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.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Retrieving parent and child category in single.php – bug, need help’ is closed to new replies.