WordPress.org

Support

Support » How-To and Troubleshooting » Using get_the_term_list and showing desc after each

Using get_the_term_list and showing desc after each

  • 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!

Viewing 1 replies (of 1 total)
  • 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> ';

Viewing 1 replies (of 1 total)
  • The topic ‘Using get_the_term_list and showing desc after each’ is closed to new replies.
Skip to toolbar