This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: How to display terms image ?

#3235
Ernest MarcinkoErnest Marcinko
Keymaster

Hi!

Great! I think this will help. So, based on this article: https://wp-dreams.com/knowledge-base/numbering-the-results/
let me try to put together a similar function. Try to put this code into to your themes functions.php file:
[php]
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;
}
[/php]

  • This reply was modified 11 years, 5 months ago by Ernest MarcinkoErnest Marcinko. Reason: apostrophes