Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search can't find certain documents and parent posts
This topic contains 29 replies, has 2 voices, and was last updated by Ernest Marcinko 3 years, 10 months ago.
- AuthorPosts
- May 7, 2020 at 6:04 pm #27170You cannot access this content.May 8, 2020 at 2:44 pm #27199
Screenshots may work. Can you screenshot all tabs under General Options, Frondend search settings and Advanced panel?
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 13, 2020 at 1:02 pm #27293You cannot access this content.May 14, 2020 at 1:01 pm #27320Thank you!
This looks perfectly fine to me. Is there any custom code used regarding the plugin (filters, hooks etc..). I honestly don’t know how some of these results are missing, the query must match them for sure, with this configuration. The only thing I can think of, if there is any custom code, it might fiddle with the output.
Just to test: Can you please create a new search instance, then go to it’s settings and only change these options:
Best,
– Disable CPT search: https://i.imgur.com/XTJdQjC.png
– Enable Attachment search: https://i.imgur.com/0OpyXje.png
Now please save it, then open the preview and try searching “noroviren”, and then “bestellforumlar” as well. Is there any difference?
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 14, 2020 at 1:11 pm #27322You cannot access this content.May 14, 2020 at 1:20 pm #27325You cannot access this content.May 15, 2020 at 9:43 am #27354Are these attachments actually in the Media Library, can you find them there? Their location does not matter, as long as they are there registered.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 15, 2020 at 4:36 pm #27380Yes they are in the media library.
May 16, 2020 at 12:01 pm #27393You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 17, 2020 at 1:57 pm #27408Hey, yep I can do that! Appreciate your hel.
May 18, 2020 at 12:00 pm #27413You cannot access this content.May 19, 2020 at 2:24 pm #27434You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 20, 2020 at 1:23 pm #27457Hi,
I have found a custom code in your theme functions.php file, which removes unlinked attachments from the search results – this is causing the problem:
/*FILTER AJAX SEARCH PRO RESULTS SO UNLINKED ATTACHMENTS DONT SHOW UP*/ add_filter('asp_results', 'asp_results_remove_unlinked_attachments'); function asp_results_remove_unlinked_attachments($results) { foreach ($results as $k=>&$r) { if ( isset($r->post_type) && $r->post_type == 'attachment' ) { $parent_id = wp_get_post_parent_id( $r->id ); if ( is_wp_error($parent_id) || empty($parent_id) ) { // Remove the post from the results list unset($results[$k]); } } } return $results; }
The missing results does not have parent posts, only simple media elements, and this custom code is removing them. Removing this custom code should resolve the issues.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 20, 2020 at 2:06 pm #27460You cannot access this content.May 20, 2020 at 2:17 pm #27461You 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.