Extension

This topic contains 44 replies, has 2 voices, and was last updated by Brigitte08 Brigitte08 3 years, 4 months ago.

Viewing 15 posts - 31 through 45 (of 45 total)
  • Author
    Posts
  • #27846
    Brigitte08
    Brigitte08
    Participant
    You cannot access this content.
    #27942
    Brigitte08
    Brigitte08
    Participant
    You cannot access this content.
    #27943
    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 :)


    #27945
    Brigitte08
    Brigitte08
    Participant
    You cannot access this content.
    #27956
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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.

    Best,
    Ernest Marcinko

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


    #27974
    Brigitte08
    Brigitte08
    Participant
    You cannot access this content.
    #27995
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I 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.

    Best,
    Ernest Marcinko

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


    #28028
    Brigitte08
    Brigitte08
    Participant
    You cannot access this content.
    #28058
    Brigitte08
    Brigitte08
    Participant
    You cannot access this content.
    #28063
    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 :)


    #28067
    Brigitte08
    Brigitte08
    Participant
    You cannot access this content.
    #29793
    Brigitte08
    Brigitte08
    Participant
    You cannot access this content.
    #29795
    Brigitte08
    Brigitte08
    Participant
    You cannot access this content.
    #29808
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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;
    }
    Best,
    Ernest Marcinko

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


    #29844
    Brigitte08
    Brigitte08
    Participant
    You cannot access this content.
Viewing 15 posts - 31 through 45 (of 45 total)

You must be logged in to reply to this topic.