Forums

List hierarchy of categories in a post (1 post)

  1. spred
    Member
    Posted 4 months ago #

    Hello,
    In my blog I have defined a list of categories and subcategories and a psot can be assingned to one o more of them. For example, there is a category named General with 2 subcategories (A and B) and another category Others with another 2 subcategories (C nd D), and a post can be assigned to A and D.
    When this post is displayed, this phrase is shown after the title: "Publised in A, C", due to this line in single.php:

    <?php the_category(', ') ?>

    However, I would like to display this information as follow:
    "Published in General->A, Others->C".

    Is it possible?
    I don't know how.

    Thank you for your suggestions!

Reply

You must log in to post.

About this Topic

Tags