Showing a different name for same taxonomy possible? (3 posts)

  1. mediadecay
    Posted 5 years ago #

    I was wondering if it were possible to use different descriptors when outputting a custom taxonomy. For example I run a site that reviews different types of things, like books and movies. In my movie review post type I have a taxonomy of "writer" that will be output when published will read like: "Writer: John Doe". But for a book review I'd like to be able to have it read like: "Author: John Doe" as it sounds better. So my question is can I use the same "writer" taxonomy in the book review post type and have it show up as Author when published? or do I have to make a different "author" taxonomy? The reason I'd like to keep it confined to one is that sometimes an author of a book will write the screenplay for the movie and I don't want to have the same person twice if I don't have to.

    I'm sorry if this is unclear.

  2. Jme
    Posted 5 years ago #

    I'm not sure how you are outputting the writer/author name but this should work.
    Where you want Author displayed
    <?php echo get_the_term_list( $post->ID, 'writer', 'Author: ', ', ', '' ); ?>

    Where you want Writer displayed
    <?php echo get_the_term_list( $post->ID, 'writer', 'Writer: ', ', ', '' ); ?>

    I hope that makes sense. For more info, check out http://codex.wordpress.org/Function_Reference/get_the_term_list

  3. mediadecay
    Posted 5 years ago #

    Yeah I figured it out on my own. I'm using that exact method. Just forgot to post the follow up. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic