gdtt_get_term_image($taxonomy, $term, $size = "thumbnail", $get = "img")

  • $taxonomy: name of the taxonomy term belongs to.
  • $term: term id or full term object.
  • $size: size of image to get.
  • $get: what to return: ‘img’ returns full image tag, ‘url’ return only image url.

Get image for a term. Size can be set as a string using standard WP descriptive values: thumbnail, icon, large, medium, or it can be array with width and height. Function can return full IMG tag or only URL.


Leave a Reply