• Been trying to fathom this out for the last few days, most of the solutions out there are for categories rather than custom taxonomies. Plus this part of WordPress seems very arcane and counter-intuitive.

    Here’s a example scenario we’ve got a custom taxonomy called manufacturer, in it we have a single level child. Like thus:

    Ford
    – Ka
    – Focus
    – Mondeo
    – Escort
    – Sierra

    Audi
    – A1
    – A3
    – A4
    – A5

    And so on.

    Now what I need to do is extract the manufacturer (Ford/Audi) and display it in a page header. I can currently display the manufacturer and the model easily enough on a custom post page but I just want it’s parent.

    This is what I have at present:

    ‘<h2>$manufacturer_list = get_the_term_list( $post->ID, ‘model’, ‘Model(s): ‘, ‘, ‘, ” ); = get_the_term_list( $post->ID, ‘manufacturer’, ‘manufacturer(s): ‘, ‘, ‘, ” );

    echo $manufacturer_list</h2>’

    The custom taxonomy is up and it does work, just need to fine tune the headers on the custom page. There also might be rare instances of dual manufacturer.

    Thanks for any help understanding this ‘mare.

  • The topic ‘Outputting Parent of a Custom Taxonomy’ is closed to new replies.