• I’m using the code below to list my custom taxonomy.

    <?php
        $terms_as_text = get_the_term_list( $post->ID, 'Skills', '', ', ', '' ) ;
        echo strip_tags($terms_as_text);
    ?>

    I’d like it so the parent category gets displayed first, followed by a pipe, and then followed by the child categories separated by commas like so:

    Illustration | Charcoal, Pen, Watercolor

    Is this possible?

  • The topic ‘custom taxonomy – listing parents first’ is closed to new replies.