Forums Forums Search & Filter Pro Search problem

Viewing 10 posts - 1 through 10 (of 11 total)
  • Anonymous
    #243144

    Good evening. I have Elementor and I download and activated “Search & Filter – Elementor Extension”.

    I created and search form into this page: https://www.virusfree-europa.com/operatori-autorizzati/

    The result are display into this page: https://www.virusfree-europa.com/operatori-autorizzati/risultati-ricerca

    Into the 2nd page are the same search form in 1st page.

    I have this problem: when I trying to search an item with the search form display into display result page, the featured images can’t see.

    Can you help me, please?

    Thank you.

    Anonymous
    #243161

    In search form, on display results, I set Elementor Posts / Portfolio / Products.

    Trevor
    #243178

    Do you have a lazyload feature on your site? For example, Jetpack and Smush plugins both have these. If you can, check the plugins you have and see if you can deactivate such options.

    Anonymous
    #243199

    Yes, I’m using “Lazy Load – Optimize Images” form WP Rocket.

    I disable the plugin and the problem didn’t show up!

    But I need a Lazy Load plugin.

    There is a way to fix it, please?

    Thank you.

    Trevor
    #243203

    The problem is to find a lazyload that can be re-triggered after an Ajax refresh of the results, or to find a way to not apply it to the result area. I do not see a way to re-trigger the lazyload in the WP Rocket help files. Maybe you can ask them. We have do a method to call that trigger.

    However, it is quite unusual to want to lazyload images in the results section of a page, so maybe you can exclude them. This WP Rocket and most lazyload plugins can do. See here:

    https://docs.wp-rocket.me/article/15-disabling-lazy-load-on-specific-images/#image-class

    You would need to add code to your child theme functions.php file:

    function rocket_lazyload_exclude_class( $attributes ) {
    	$attributes[] = 'class="attachment-medium size-medium"';
    
    	return $attributes;
    }
    add_filter( 'rocket_lazyload_excluded_attributes', 'rocket_lazyload_exclude_class' );

    Normally, one should work with a child theme (it is what WordPress recommends). If you are not, then make one using the Orbisius plugin that will do it for you. Simply accept the default settings and it will make and activate it for you, then you can remove that plugin. It should not change anything about your site.

    Modified files (such as the functions.php file) should always be kept in the child theme folder.

    Anonymous
    #243205

    I must edit this code before put it into functions.php file?

    function rocket_lazyload_exclude_class( $attributes ) {
    	$attributes[] = 'class="attachment-medium size-medium"';
    
    	return $attributes;
    }
    add_filter( 'rocket_lazyload_excluded_attributes', 'rocket_lazyload_exclude_class' );

    Thank you.

    Trevor
    #243207

    No need to edit, I edited it for you already, based on your search page.

    Anonymous
    #243209

    Thank you so much.

    Trevor
    #243211

    Can you let me know if that works for you?

    Anonymous
    #243213

    Now it’s working!

Viewing 10 posts - 1 through 10 (of 11 total)