Is it possible to exclude lazy load on tag archives?
-
Hi – I’m trying to use this code to exclude lazy load on just tag archives:
function deactivate_on_tag() { // Disable LazyLoad for images on a 'tag' post type singular template. if ( is_tag ) { add_filter( 'do_rocket_lazyload', '__return_false' ); add_filter( 'do_rocket_lazyload_iframes', '__return_false' ); } } add_filter( 'wp', __NAMESPACE__ . '\deactivate_on_tag' );
Although it does exclude the lazy load on taf archives, it also excludes / disables the lazy load on all archives, including the blog post page and front page.
Is there any code that will target just the tag archives? Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Is it possible to exclude lazy load on tag archives?’ is closed to new replies.