Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Horizontal Results not working › Reply To: Horizontal Results not working
July 7, 2015 at 1:03 pm
#5265
Hi!
I have found a solution, the images should now appear. I put the following code to your themes functions.php file to achieve that:
if (!function_exists("parse_tpl_image")) {
add_filter( "asp_results", "parse_tpl_image", 1, 1 );
function parse_tpl_image($results) {
foreach ($results as $k => $result) {
if ($result->image == null || $result->image == "") {
$m = bdw_get_images_plugin($result->id, 'directory-single-thumb');
if (is_array($m) && isset($m[0]['file'])) {
$results[$k]->image = $m[0]['file'];
}
}
}
return $results;
}
}
-
This reply was modified 9 years ago by
Ernest Marcinko.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
![](https://wp-dreams.com/assets/envato/comment-button-knowledgebase.png)
![](https://wp-dreams.com/assets/envato/comment-button-support.png)
![](https://wp-dreams.com/assets/envato/comment-button-facebook.png)
![](https://wp-dreams.com/assets/envato/comment-button-twitter.png)