Forums › Forums › Search & Filter Pro › Search problem
- This topic has 10 replies, 2 voices, and was last updated 4 years, 6 months ago by Trevor.
-
Anonymous(Private) May 8, 2020 at 5:56 pm #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.
Trevor(Private) May 9, 2020 at 8:53 am #243203The 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(Private) May 9, 2020 at 9:30 am #243205I 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.
-
AuthorPosts