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 4 years, 3 months ago.
- AuthorPosts
- February 14, 2019 at 2:17 pm #21114
I need you to show me the search images of the other sites just show me the images of the current site, is it possible to solve this? If you need more information about it please request.
February 14, 2019 at 3:49 pm #21124Hi,
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 :)
February 18, 2019 at 6:30 pm #21152You cannot access this content.February 19, 2019 at 10:45 am #21157Hi,
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 :)
February 19, 2019 at 11:51 am #21158You cannot access this content.February 19, 2019 at 2:39 pm #21174Hi,
Thank you!
I have added the following code to the functions.php file in the theme directory, I think it’s working now:
Best,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; }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 19, 2019 at 4:17 pm #21180Ohhh thank you! you’re the best
February 19, 2019 at 4:18 pm #21181You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.