0,00 USD

No products in the cart.

Saturday, February 27, 2021
0,00 USD

No products in the cart.

Getting Your Extra Or Divi Video Post Format Featured Video to Work With WP Rocket Lazyload

Home » Home and Garden » Getting Your Extra Or Divi Video Post Format Featured Video to Work With WP Rocket Lazyload

Problem: I love WP Rocket; I think it’s one of the best optimization plugins available. Their iframe and video optimization can make a significant difference in speed for pages that include videos as it creates an overlay, so the video doesn’t load until it’s clicked. However, in Elegant Theme‘s Extra theme, its video post format already includes an overlay. The WP Rocket lazyload disables Extra theme featured video. When you turn on WP Rocket lazyload, then the Extra featured video won’t work. This is likely true for Divi as well.

I could just turn off lazyload. However, I have other videos that use the YouTube block. Having the iframe and video lazyload turned on makes a significant difference in website speed for posts that include video.

Here’s what I did to disable the WP Rocket lazyload for the Extra video post format featured video:

WP Rocket offers a snippet to disable lazyloads based on patterns. 1080 was the only pattern I could find to exclude that actually worked.

If you try this snippet as always, place it in your functions.php, ideally in a child theme. And make sure to make a backup of your existing functions.php before making any changes.

Here’s the snippet:

/*disable lazyload for divi and extra video post format iframes*/
function rocket_lazyload_exclude_pattern( $pattern ) {
    $pattern[] = '1080';
    return $pattern;
add_filter( 'rocket_lazyload_iframe_excluded_patterns', 'rocket_lazyload_exclude_pattern' );

Hopefully, this can help your video format posts blast off again!

Did this work for you? Do you have any other suggestions to help with this issue?

How many hot cups of coffee does this post or page deserve?

Click on an icon to rate it.

Average rating: 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Care to share?

We are sorry that you found this post to be like a weak cup of decaf.

Let us improve this post!

Tell us how we can improve this post?

Cheryl is a former Occupational Therapist and WordPress enthusiast who became a writer in some parallel universe and occasionally, but infrequently, publishes things in this one. She writes two blogs (or is it three) which she won't quit because she knows that blogs, in her case, are like a hydra and if she cuts one off two more will take its place. When she's not doing that, she enjoys hiking, cycling, kayaking (formerly fast, now ebike), messing around with Adobe illustrator, making assorted things, meditating (though she wouldn't call that "like," and reading. She normally doesn't speak about herself in the third person, but she sometimes uses "we" in the royal sense while writing this blog. She lives in Poulsbo, WA with her spouse, her youngest adult daughter, a very old mutt, and a Siamese cat.
Notify of
Inline Feedbacks
View all comments

You may also be interested in:

Adding Google Analytics to WordPress

Zip has installed an SEO plugin. So he probably wants to be able to find out how many visitors are actually coming to his website and what pages they are viewing. In this post, he'll install Google Analytics using a plugin so he can start viewing analytics data for his new website.

How to Use Yoast to Configure Your Post for SEO

Zip's added the Yoast SEO plugin to his blog. Let's look at how he can optimize a post (or page) for search engine optimization using the Yoast plugin as well as some things to keep in mind when using this helpful plugin.

Sloth Installs an SEO Plugin (Why You Should Use an SEO Plugin and How to Configure Yoast SEO)

Zip has completed basic design work on his blog. Next, he's going to move on to Search Engine Optimization. In this post, we briefly look at some of the plugins available to help with SEO, and install and configure the Yoast SEO plugin.
Share via
Liked it? Follow us on social media!
Thanks for sharing!
If you found this post worth sharing, consider following us on social media (if you don't already).
And if you have something you would like to share, consider submitting a post. Find out more here.
Send this to a friend