Selective LazySizes (pro version)
-
Hi, I was wondering how I might disable Lazysizes on certain pages.
Because I have some complex layouts on my homepage, lazyload is never going to make sense.
But it works well for individual posts.
At the moment I have edited wp-retina-2x.php to add a conditional is_singular
if ( $lazysize && is_singular() ) { $element->class = $element->class . ' lazyload'; $element->{'data-srcset'} = "$img_url, $retina_url 2x"; }
Obviously this isn’t ideal as it will be overwritten when I update the plugin.
Could you suggest another method that would be permanent?
Seb
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Selective LazySizes (pro version)’ is closed to new replies.