the_category display and order (1 post)

  1. greencode
    Posted 4 years ago #

    I have a post in the following categories:

    - USA
    - - Texas
    - Racket Sports
    - - Tennis
    - - Squash

    So when I list those categories in the post using the_category I would like them to be displayed as follows (also, note I would like the parent categories removed)

    USA | Texas | Racket Sports | Squash | Tennis

    I can't - for the life of me - figure out how to do this. The main issue here is ordering the parent and sub-cats. At the moment using the_category it orders as follows:

    Country | Racket Sports | Sport | Squash | Tennis | Texas | Texas | USA

    i.e in alphabetical order with no regard to the parent/sub category order.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.