• Hi,

    My Post will be posted in multiple categories, I want to list them on the hierarchy and not by comma seperated.

    For Eg : “Sample Post” is posted in categories
    [Region >> Americas]
    [Country >> USA]
    [City >> New York]

    So instead of displaying Americas, USA, New York

    I would like to display as
    Region : Americas
    Country : USA
    City : New York

    I can use custom field to display this, but I want to use categories instead.

    Please Help

Viewing 1 replies (of 1 total)
  • If you are getting the term object for each term (‘Americas’, ‘USA’, and ‘New York’), you can use the parent value for each term to get its parent object.

    From the parent object, you can get the name.

    I might be able to be more specific if you put the code you are using into a pastebin and post a link to it here.

Viewing 1 replies (of 1 total)
  • The topic ‘How To Display Categories of Post?’ is closed to new replies.