Reply To: How to display terms image ?

Ernest Marcinko
Ernest Marcinko


Great! I think this will help. So, based on this article:
let me try to put together a similar function. Try to put this code into to your themes functions.php file:

add_filter( "asp_results", "asp_term_image_results", 1, 1 );
function asp_term_image_results( $results ) {

  foreach ($results as $k=>$v) {
    // get the term images
    if (isset($GLOBALS["CORE_THEME"]["category_icon_".$results[$k]->id]))
      $results[$k]->image = $GLOBALS["CORE_THEME"]["category_icon_".$results[$k]->id];
  return $results;
  • This reply was modified 9 years, 5 months ago by Ernest Marcinko Ernest Marcinko. Reason: apostrophes
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)