• Resolved toddlerh

    (@toddlerh)


    Hello,

    Per this page, there should be an option to disable LazyLoad for certain images or CSS classes: https://docs.wp-rocket.me/article/15-disabling-lazy-load-on-specific-images

    My LazyLoad is creating a conflict with the thumbnails for WordPress Popular Posts, so I’d like to disable Lazy Load for .wpp-thumbnail. However, in my LazyLoad plugin settings there’s no area to disable certain classes as shown on the instruction page linked above.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author WP Media

    (@wp_media)

    Hi @toddlerh !

    The field is only available within WP Rocket settings.

    Please use this helper plugin https://github.com/wp-media/wp-rocket-helpers/tree/master/lazyload/wp-rocket-lazyload-disable-class to add the classes to exclude.

    You will need to edit lines 33-39 of the helper plugin where you can add necessary classes.

    Alternatively, you can add this code snippet to the functions.php of your child theme:

    function rocket_lazyload_exclude_class( array $attributes ) {
    
    	// EDIT/REPLACE THIS EXAMPLE:
    	$attributes[] = 'your-class-name'; 	
    
    	return $attributes;
    }
    add_filter( 'rocket_lazyload_excluded_attributes', 'rocket_lazyload_exclude_class' );
    

    I hope this helps!

    Best,
    Natalia

Viewing 1 replies (of 1 total)
  • The topic ‘CSS Exclusion Option Not Showing in’ is closed to new replies.