- This topic has 44 replies, 2 voices, and was last updated 3 years, 11 months ago by Brigitte08.
-
AuthorPosts
-
June 13, 2020 at 9:30 am #27846Brigitte08Participant
You cannot access this content.
June 18, 2020 at 10:55 am #27942Brigitte08ParticipantYou cannot access this content.
June 18, 2020 at 2:41 pm #27943Ernest MarcinkoKeymasterYou cannot access this content.
June 18, 2020 at 3:15 pm #27945Brigitte08ParticipantYou cannot access this content.
June 19, 2020 at 9:28 am #27956Ernest MarcinkoKeymasterHi,
The problem is, that the featured images are not set, and there are no actual image elements on the page either. The plugin tries to get the featured image first, then the “img” and different attributes on “div” elements. The images within the smart slider module are coming from a slider shortcode, which probably is not registered within ajax requests, or the slider is not yet loaded at that time – so those the plugin cannot fetch.
I recommend setting a featured image for each item if possible, as it is great for any plugin/custom code that needs to request an image for the posts.
June 19, 2020 at 3:48 pm #27974Brigitte08ParticipantYou cannot access this content.
June 22, 2020 at 7:23 am #27995Ernest MarcinkoKeymasterI can only guess – but it was probably an update to something tha contained the images. If you didn’t have any featured images, then I guess something in the content was printing images. It could have been the slider or something similar. Those plugins may have been updated, the output or the shortode loading method probably changed. The search did not change, neither did the configuration, and since I cannot see any image tags in the post content, I suspect that one of the plugins may have been updated.
Setting featured images will bypass this, and will work regardless of the content of the items.
June 22, 2020 at 5:02 pm #28028Brigitte08ParticipantYou cannot access this content.
June 23, 2020 at 4:47 pm #28058Brigitte08ParticipantYou cannot access this content.
June 24, 2020 at 8:14 am #28063Ernest MarcinkoKeymasterYou cannot access this content.
June 24, 2020 at 9:02 am #28067Brigitte08ParticipantYou cannot access this content.
October 14, 2020 at 3:15 pm #29793Brigitte08ParticipantYou cannot access this content.
October 14, 2020 at 3:16 pm #29795Brigitte08ParticipantYou cannot access this content.
October 15, 2020 at 10:27 am #29808Ernest MarcinkoKeymasterHi,
The problem with that is – that running an SQL query there is no way to compare values against an array, because the meta field is a string always, in this case it is the “array” serialized into a string value. Making changes to the actual filter is not going to work.
I think the best way to approach this is probably when the search is complete and remove the items in the post process via the asp_results filter. The $args array contains the filter values as well, so the date which the user selected.
Something to help you start with:
add_filter( 'asp_results', 'asp_remove_custom_res', 10, 4 ); function asp_remove_custom_res( $results, $id, $is_ajax, $args ) { foreach( $args['post_meta_filter'] as $filter ) { //var_dump($filter); // Check how this looks like if ( $filter['key'] == 'meta_field_name' ) { // $filter['value'] ->> this has the date value // use this to exclude the items /* * foreach ( $results as $k => $r ) { * if ( ... ) * unset($results[$k]); * } */ } } return $results; }
October 17, 2020 at 10:33 am #29844Brigitte08ParticipantYou cannot access this content.
-
AuthorPosts
- You must be logged in to reply to this topic.