Skip to content

Frank Goossens' blog

  • Web-Tech blogposts
  • Other blogposts
  • WordPress & plugins
    • WP YouTube Lyte
    • Autoptimize
    • WP DoNotTrack
    • Do Not Donate!
  • about
    • Timemachine
    • Contact

post_meta

How to see WP YouTube Lyte’s cache for a post

April 27, 2015 by futtta

WP YouTube Lyte stores data it fetched from YouTube’s API in WordPress’s add_post_meta, thus avoiding to have to contact YouTube for subsequent requests. You can clear the entire cache by ticking that option on Lyte’s settings-page, but maybe you want to only remove the cache for one specific post or even fix a problem with a stale cache-entry?
In that case, this little code-snippet (to be used in a plugin or in your child theme’s functions.php) might help:

if (is_admin()) {
    add_filter( 'is_protected_meta', 'lyte_unprotect_meta', 10, 3);
}
function lyte_unprotect_meta($protected, $meta_key, $meta_type) {
    if (strpos($meta_key,"_lyte_")===0){
        return false;
    } else {
        return $protected;
    }
}

This little filter tells WordPress not to consider post_meta with a key that starts with “_lyte_” as protected, rendering it visible in the “Custom Fields” box on the “Post Edit”-screen. If this is active you can just edit your post, going to “Custom Fields” and removing the entry (or change it’s value, if you’re a guncompressing, base64_decoding hard-ass like that);
lyte_cache_in_custom_field-compressor_smaller-compressor

Categories howto, lang:en, wordpress, wp-youtube-lyte Tags custom field, lyte cache, post_meta 1 Comment

My YouTube is Lyter then YourTube!

March 13, 2013 by futtta

The latest WP YouTube Lyte version came with support for responsive themes and added microdata for better search-engine discovery of your embedded video’s. But there were also some important improvements from a performance point of view;

  • The title of the video (and the description, length, …) is now requested and cached server-side (the data is stored in the WordPress database, as post_meta, to be precise) and included in the HTML instead of getting that data client-side using JavaScript
  • The LYTE player chrome (the play button -with 2 states- and the bottom control) is now fetched with one request for a CSS sprite (lytesprite.png) instead of 2 separate images
  • And finally a lot of the player properties are now defined in CSS instead of being dynamically set in JavaScript, resulting a a significantly smaller JavaScript-file

But what are words worth, you only want to know if WP YouTube Lyte still out-performs normal YouTube embeds, right? Well, there’s nothing like a nice old-fashioned comparative webpagetest;org test to see where we stand!

document completefully loadedvideo only
time (s)requestssize (KB)time (s)requestssize (KB)requestssize (KB)
Standard YouTube (page | result)1.757101674.718134838429.8
WP YouTube Lyte (page | result)1.0216791.3538100322.9

So yeah, WP YouTube Lyte is more efficient then normal YouTube embeds, by a very large margin! Now go and preach to the unfaithful, because after all, doesn’t the world deserve Lyter YouTube embeds?

Categories lang:en, performance, wordpress, wp-youtube-lyte Tags css sprite, oembed, post_meta, youtube 4 Comments

Autoptimize user? Speed up your site even more with AO Pro, use futttablog coupon code to get a 10% discount!

  • subscribe to my web-tech blogfeed
  • abonneer op niet-technische artikels
  • fediverse: @frank@blog.futtta.be
  • @futtta on the fediverse (mastodon)
This is an ad-free blog!

You said, she said

  1. James Britt on As seen on YouTube; Angine de Poitrine live on KEXP
  2. Melroy van den Berg on How to go block-less with the WordPress ActivityPub plugin
  3. europlus autisminf on How to go block-less with the WordPress ActivityPub plugin
  4. frank goossens 🇧🇪🇪🇺 on How to go block-less with the WordPress ActivityPub plugin
  5. 🌈 Lascapi ⁂ on How to go block-less with the WordPress ActivityPub plugin

Recent Blogposts

  • How to go block-less with the WordPress ActivityPub plugin
  • As seen on YouTube; Angine de Poitrine live on KEXP
  • Zijn er Meshcore-users in de Limburgse Maasvallei?
  • New (old) bicycle; going to gravel
  • w.social invite code
© 2026 Frank Goossens' blog • Built with GeneratePress