Using get_the_term_list and showing desc after each (2 posts)

  1. shaneholden
    Posted 5 years ago #

    Is it possible to use get_the_term_list to list out the terms of a custom taxonomy associated with a post, and include the description after each?

    For example:

    Term 1(desc1), Term 2(desc2), Term 3(desc3)

    I've been playing around and combining code for the past few hours, but can't seem to get it to work as desired.

    Thank you all!

  2. shaneholden
    Posted 5 years ago #

    Well, I've managed to get that working to an extent. There's no separating commas, but still better than what I had.

    One more question related to this. If I echo the description, followed by an image linking to Amazon search, how do I pass the post's category into the < a > link w/o breaking the site?

    echo $term->description.' <a type="amzn" search="" category="amazon-music"><img src="http://www.lyriclynx.com/wp-content/themes/tembang/images/amazon.png"></a> ';

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.