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

Images not showing on search

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Images not showing on search

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6690
    altierraaltierra
    Participant

    Hi there,

    Hope you’re doing great! I purchased Ajax Pro a while back and I then came to get support for images not showing up on search. You did something and it fixed it. But after I made updates on the wordpress theme all customizations were wiped out. Can you tell me what you did then so I can fix my site? Thank you so much and have a great day!

    Regards,

    Allan

    #6692
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    No problem, I’ve found the previous topic and fixed it again 🙂 For future reference, the following code was added to your theme functions.php file:

    [php]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;
    }
    }
    [/php]

    #6693
    altierraaltierra
    Participant

    Wow that was fast! Thank you so much for the support. Have a great day!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.