show images on the multisite results page

Home Forums Product Support Forums Ajax Search Pro for WordPress Support show images on the multisite results page

This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 5 years, 2 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #21114
    alan
    alan
    Participant
    #21124
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    It is a bit hard to answer, in some cases it might be possible. Generally multisite results pages are not capable of displaying results from across sites. There is a method in ajax search pro to basically force these results as ‘fake’ posts and change their URLs.

    If you are somewhat familiar with theme coding, or already made changes to the theme files, then there is a theme function API available for the plugin. So if you can somehow locate the theme code where the images are printed, you could use this method (within the loop) to get the images parsed by Ajax Search Pro:

    get_asp_result_field('image');

    ..this returns the result image, if available. I am honestly not sure if this would work with any multisite environment though.

    Best,
    Ernest Marcinko

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


    #21152
    alan
    alan
    Participant
    You cannot access this content.
    #21157
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Your idea seems correct to me, to be honest, the code seems to be okay. However I am not sure where the ‘rh_no_thumb_url’ custom filter is executed, it might be out of the loop. It is also possible that the post data from the search is no longer available at that point, and then the function is not able to return it.

    If you want, you can add temporary FTP details, and I can try to debug through the code, to see what exactly is happening.

    Best,
    Ernest Marcinko

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


    #21158
    alan
    alan
    Participant
    You cannot access this content.
    #21174
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you!

    I have added the following code to the functions.php file in the theme directory, I think it’s working now:

    add_filter('rh_no_thumb_url', 'asp_custom_def_image');
    function asp_custom_def_image($imagee){
      $imagee  =  get_asp_result_field($field = 'image');
      return $imagee;
    }
    Best,
    Ernest Marcinko

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


    #21180
    alan
    alan
    Participant

    Ohhh thank you! you’re the best

    #21181
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.