Lazy Loading iFrames
-
I need to disable Lazy Load for all iFrames in WordPress (version 5.8.1). I have tried this code in functions.php but iFrames are still Lazy Loading. Any ideas how to solve that?
function disable_post_content_iframe_lazy_loading( $default, $tag_name, $context ) { if ( 'iframe' === $tag_name && 'the_content' === $context ) { return false; } return $default; } add_filter( 'wp_lazy_loading_enabled', 'disable_post_content_iframe_lazy_loading', 10, 3 );
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Lazy Loading iFrames’ is closed to new replies.