WordPress.org

Ready to get started?Download WordPress

Forums

Help with Custom Categories & Taxonomies (1 post)

  1. emj
    Member
    Posted 1 year ago #

    Hi,

    Am hoping someone can help me pull out a single custom category name and show it on my custom post page.

    Basically, I've created a new custom post type 'Itinerary' as well as some new custom categories:

    Experience
    - Water Sports
    - Hiking Adventures
    - Mountain Biking
    ...
    Destination
    - Australia
    - Canada
    - South America
    ...

    Each Itinerary has 2 categories applied to it, for example:
    Itinerary 'Coastal Walks' is categorised as Hiking Adventures and Australia.

    I would like to display in my custom itinerary page the name of the Destination
    e.g. Region: Australia (or whatever destination is selected)

    I've tried using this:
    <?php echo the_terms( $post->ID, 'trip_cat', 'Region: ', ', ', ' ' ); ?>

    which displays all the categories selected - however I'm trying to display only the child of the parent category Destinations.

    Is anyone able to shed some light?

    :)

Topic Closed

This topic has been closed to new replies.

About this Topic