Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › AFC and Ajax Search Pro – Filter & Search Problems
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 1 month ago.
- AuthorPosts
- January 28, 2022 at 11:39 pm #36465
Hello,
we do have some problems with Ajax Search Pro and ACF. We using ACF a lot, and need Ajax Search Pro to work good with ACF.
1) Check omkb.de/videos – If you use the filter for “Unternehmen” for example, if you choose “AB Tasty” it will show you one result. But if you search the page for “AB Tasty”, you will get two results. We don’t get it. The ACF field does include “AB Tasty” in booth cases. We see this problem at some other points too, that the filter are just not working good enough. Even with Categories, which are not ACF fields, we get some errors.
2) If you use the search on the page. There is some case, when the picture is not shown right. Search is just showing another picture. I can’t say why.
Can you help me?
Best
January 31, 2022 at 2:30 pm #36486Hi,
1. That means, that the word “AB” and “Tasty” are matched in either some other selected field (like title, content, excerpt, taxonomy terms etc..).
When I click the second result, I can already see multiple matches for both keywords: https://i.imgur.com/scbjjLu.png2. I tried the search phrase “AB Tasty” and the second result is pointing to this image URL: https://omkb.de/wp-content/uploads/2021/08/reviews-logo-fallback.png
Best,
..this URL goes to a blank 404 page. Check if the featured image is set correctly, as it seems that this file does not exist. The plugin requests the image from WordPress core, and the first default source is the featured image, so I assume that is set incorrectly.
You can also change the image sources as you wish: https://documentation.ajaxsearchpro.com/general-settings/image-options
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 31, 2022 at 3:18 pm #36493Hello, we use this Script:
function acf_set_featured_image( $value, $post_id, $field ){
if($value != ”){
//Add the value which is the image ID to the _thumbnail_id meta data for the current post
delete_post_thumbnail( $post_id);
add_post_meta($post_id, ‘_thumbnail_id’, $value);
}return $value;
}// acf/update_value/name={$field_name} – filter for a specific field based on it’s name
add_filter(‘acf/update_value/name=logo’, ‘acf_set_featured_image’, 10, 3);
add_filter(‘acf/update_value/name=speaker_bild’, ‘acf_set_featured_image’, 10, 3);
add_filter(‘acf/update_value/name=image’, ‘acf_set_featured_image’, 10, 3);
add_filter(‘acf/update_value/name=speaker_bild_in_video’, ‘acf_set_featured_image’, 10, 3);January 31, 2022 at 3:56 pm #36494Okay, so that I can imagine cause the issue, as the featured image is still set, but points to a non-existing file.
Try this configuration then: https://i.imgur.com/YlOYh3g.png
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 31, 2022 at 6:04 pm #36495We have fixed the image (path was not set right in AJAX Pro) and setup the configuration as you described. Problem still is there.
February 1, 2022 at 10:00 am #36496– What search phrase should I test for to see missing images?
Best,
– Can you please link to a post where the image should be present?
– Can you please add temporary (s)FTP and back-end details, so we can debug the code if neccessary and check the configuration?
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.