Skip to main content
Agency Program Get 2× more leads and save 50% on hosting. Built for agencies ready to grow. Book a call
YouTube Embed icon

YouTube Embed

v5.3.1
by YouTube Embed Plugin Support · 4.2 (24 reviews)

? An incredibly fast, simple, yet powerful, method of embedding YouTube videos into your WordPress site.

10K+ active installs Updated Jan 15, 2024 Tested to 6.4.5 Requires PHP 7.4
Try Demo Download
Pre-installed Ready in ~10s No card

About YouTube Embed

YouTube Embed is a WordPress plugin that allows you to easily embed YouTube videos into your website. It has features such as creating playlists, automatically generating playlists based on user name, and dynamic video sizing for responsive sites. It also supports third-party resizing scripts and has options for adding metadata and downloading videos.

Screenshots

YouTube Embed screenshot
YouTube Embed screenshot
YouTube Embed screenshot
YouTube Embed screenshot
YouTube Embed screenshot
YouTube Embed screenshot
YouTube Embed screenshot

Frequently asked questions

How easy is it to use?
The fine people at Webucator have put together an excellent video showing you how to get started with it..
How do I add a video to a post or page?
To add a video to a post or page simply use the shortcode [youtube]video[/youtube], where video is the ID or URL of the YouTube video. Alternatively, you can add one (or more) widgets to your sidebar.
How do I create an API key?
At the top of the YouTube Embed Settings administration screen is an option to specify an API key. This is optional but many of the features of this plugin - including accurate video information being added to the metadata - will not be available without it.
What other parameters can I use with the shortcode?
The available parameters depend on the user's set-up, but some examples include annotation, autoplay, cc, cc_lang, color, controls, disablekb, fullscreen, height, language, list, loop, modest, playsinline, profile, ratio, related, responsive, start, stop, style, template, user, and width.
How do I create my own video playlists?
YouTube allows users to create their own playlists - collections of videos that can be played in sequence. These are embedded in the same way, by supplying the playlist ID.

Changelog

I use semantic versioning, with the first release being 1.0.

5.3.1

  • Maintenance: Update made to plugin meta

5.3

  • Enhancement: Added some new, shinier meta to the plugin file. It doesn’t do anything other than make me look like a slightly more competent developer. Just
  • Maintenance: I retired the showinfo parameter some time ago but, like some poor cleaner, sweeping things under the bed, I left some remnants behind – I’ve now cleaned those up properly
  • Maintenance: Google has got rid of the search option. Boo. So, I’ve removed all the options for that. Sorry, but blame those people who “do no evil”
  • Maintenance: Removed the code that added debug output to your HTML. This way, your page output is slightly smaller. Small is mighty, don’t forget!
  • Bug: The start and stop parameters had stopped working. I’ve fixed this oversight.
  • Bug: Fixed some escaping I was using – I was missing a parameter but, as it turned out, it was the wrong type to use anyway. So, corrected that.

5.2.4

  • Enhancement: As per my support post, I’m winding down work on this plugin. The best alternative is EmbedPlus, so I’m adding some links to the plugin to direct users to that

5.2.3

  • Enhancement: Compatibility with PHP 8 and above

5.2.2

  • Enhancement: A second attempt to fix that pesky vulnerability. Hopefully, all should now be well

5.2.1

  • Enhancement: Fixed a security vulnerability where the shortcode attributes not being escaped/validated. Thanks to apple502j for reporting this, via WPScan

5.2

  • Enhancement: What have I been doing during the pandemic? Picking through this code and resolving coding standards. Sigh. There’s a LOT. Not all are done but will be in future updates but, for now, the majority are. Based on the amount of code I’ve had to change, I’m worried I’ve broken something. But, you know, every day’s a school day and this has taught me a LOT
  • Enhancement: Look, I know I keep moving it but the plugin settings really shouldn’t be anywhere other than under the Settings menu. So I’ve moved it back there
  • Enhancement: Added native lazy loading to the videos. I’ll maybe look to add it to the thumbnails at a later time – does anybody want that?
  • Enhancement: I’ve improved the cache key generation. But, what this does mean, is that updating will cause all your YouTube Embed caches to clear. All your cache are belong to us
  • Enhancement: Clarified the API sign-up process in the README

5.1.1

  • Enhancement: Added extra plugin meta
  • Bug: The URL separator was not always correct – it still seemed to work but it was sloppy
  • Bug: Reduced the top padding on videos
  • Bug: Single-video looping was not working due a change in how YouTube nows processes them (they now have to be single-video playlists for them to loop. Yeah, I know)

5.1

  • Enhancement: Now supports specifying the language for the closed captions
  • Enhancement: Moved interface language option from the settings screen to profiles
  • Enhancement: You can now head to the settings screen and specify your own videos to be used on the profile screen
  • Enhancement: Added option to allow the Closed Caption language to be specified
  • Enhancement: Removed option in profile page to view an example 3D video. That just left a standard video and a playlist so, instead of switching between them, both examples are now set out on the page (so no need to switch now)
  • Maintenance: Removed deprecated window mode, auto-hide, HTML 5 and theme options
  • Maintenance: Removed the plugins menu
  • Bug: The demo videos weren’t working, so they’ve been updated
  • Bug: Fixed an issue with the video cache, which was expiring too quickly

5.0.6

  • Bug: It would appear that some of the code for the editor button was still lurking in dark corners of the plugin. That’s caused those not rocking Gutenberg to see errors or, worst still, the dreaded “white screen of death”. Apologies. I’ve now hoovered out all of the muck
  • Bug: Whilst fixing the above, I noticed the title of one of the settings was wrong, so I’ve fixed that oo

5.0.5

  • Maintenance: The rel parameter has changed and the showinfo has been deprecated. Have updated the plugin for these changes
  • Maintenance: I’ve removed the editor button. It doesn’t work after WP 5.0 and I don’t wish to maintain it
  • Maintenance: I’m now using a time constant when caching
  • Maintenance: Added Github links to plugin meta
  • Maintenance: Using the checked function for screen output
  • Maintenance: A minor language tweak, where I was specifying something that should, ideally, be captured by translations instead

5.0.4

  • Maintenance: Updated this README for better presentation in the new plugin directory. Funky.
  • Maintenance: The minimum requirements for this plugin is now WordPress 4.6 so language files could be got rid of and various other bits of change. Smooth.
  • Maintenance: Links to artiss.blog have been fixed. Smashing.

5.0.3

  • Enhancement: Now allow the align parameter in the profile HTML

5.0.2

  • Enhancement: I now include the shortcodes code whether you’re in admin or not, as there is no performance improvement by doing otherwise
  • Enhancement: After WordPress 4.6 you don’t need to load the text domain. So I don’t!
  • Enhancement: Fixed XSS vulnerability by restricting which HTML tags can be used in the template field. Thanks to Tristan Madani for reporting this

5.0.1

  • Maintenance: Now suppressing errors when fetching of API data fails
  • Maintenance: Updated the drop-down of video sizes in the profiles screen, based upon latest YouTube recommendations
  • Maintenance: Two sections of the README had the same name so wasn’t displaying correctly on wordpress.org – now corrected!
  • Maintenance: Updated the screenshots – something I should have done for 5.0 but forgot (mumbling apologies)
  • Bug: Okay, I admit it, I was caching the videos when they were random user-generated playlists, which meant the random order was the same each time . Now I suppress caching if this is the case
  • Bug: For reasons I’ve yet to ascertain, some people appear to have an old value left over as the API key. I’ve therefore added a check for this and will clear it down if needs be
  • Bug: Got rid of a number of PHP errors, most of which would have caused issues with the code as well
  • Bug: No-one spotted this one but I did – the list and profile counts weren’t always correct. Also, the profiles count was getting a bit confused with the lists count and the list count had really no idea what it was doing generally. Basically, it’s sorted
  • Bug: To make things easier for myself I changed the array names that held the profile and list names. But, yeah, this means they weren’t transferred from previous setups. Arse. Okay, that’s now sorted
  • Bug: In trying to resolve that last issue I found that the code that’s supposed to run during a plugin update wasn’t. Some jiggery-pokery later, it’s been re-written and works like a dream!

5.0

  • Enhancement: The API is back ! The plugin can now fetch video information to add to the metadata
  • Enhancement: Caching is back ! Now that I’m happy with the speed of the main code, I’m now happy to cache it
  • Enhancement: Added housekeeping for the caching, because WordPress is rubbish at doing it itself <grumble, don’t get me started>
  • Enhancement: A new shortcode has been added to allow you to easily output video information to your post or page using a simple templating system
  • Enhancement: Added the new API data to the metadata but also added more elements
  • Enhancement: Improved the video ID validation if the API is not used
  • Enhancement: WordPress has a nasty habit of modifying the video IDs that are passed to the plugin. Most of these we’re already able to undo, but it’s now been enhanced further to work even better
  • Enhancement: The thumbnails shortcode now uses the API and, as a result, is slimmer and works with playlists too!
  • Enhancement: Made some minor changes towards better accessibility. It’s been pretty shoddy up until now but the next release should complete this work
  • Maintenance: Data is passed around between functions via arrays rather than LOTS of variables, which is a much better of doing it
  • Maintenance: Removed the old video validation process as this is now handled by the API function
  • Maintenance: Widget changes to support the customizer in WP 4.5
  • Maintenance: Changed the branding back. Because it’s me you want – I understand that now
  • Maintenance: Tested for WP 4.6 and PHP 7 compatibility because, you know, it’s the future
  • Maintenance: Re-wrote this bad boy README
  • Bug: Fixed metadata output issues with playlists
  • Bug: Fixed bug where lists would not display if the new performance option was switched on
  • Bug: Fixed issue with the uninstaller

4.3.4

  • Bug: Fixed issue with 3 hyphens in a video ID being converted to —

4.3.3

  • Maintenance: One of the URLs in the README is being reported as being infected by malware. I have therefore removed this URL but have changed the release number, although no code has changed, to force the new version to download to existing users

4.3.2

  • Bug: Correct validation of list field, which was preventing more than one video being specified
  • Bug: Fixed the URL for the settings link in the plugin meta

4.3.1

  • Bug: Had removed a function (by accident, you understand) that converted the old alternative shortcode settings to a new format. The result is that the conversion didn’t take place and an array was passed as a shortcode name to WordPress Core, generating an error. The function has been added back in

4.3

  • Enhancement: Added new “Third Party Plugins” screen, which lists third party plugins that work alongside YouTube Embed, adding extra functionality. You can view, install and see the status of these plugins from this screen
  • Maintenance: Moved the settings back to the YouTube Embed menu
  • Maintenance: Renamed menus to be more specific
  • Maintenance: Updated the function names, which were still using the out-dated “vye” prefix

4.2.1

  • Bug fix: Quotes were not being dealt with correctly in the template field. Now corrected.

4.2

  • Enhancement: Re-written the core embedding code. Redundant code removed and, for the remaining code, re-imagined to improve performance
  • Enhancement: Massively changed how the plugin retrieves saved options and, in particular, how I populate default values. The result? Even better performance
  • Enhancement: Reviewed and reduced the calls to fetch the options
  • Enhancement: Added a new general option to allow you to force a list type to be specified before a list can be used. The reason? By doing this the code doesn’t have to check if the ID it a list name each time and it improves performance. For those upgrading this will be switched off by default to maintain backwards compatibility
  • Enhancement: Admin bar options only appear if viewing the admin bar on the site (showing it whilst in the admin screens seemed rather pointless)
  • Enhancement: If you use WordPress Video Overlay Ads or Video SEO for WordPress then the settings menus will appear under the YouTube Embed menu
  • Enhancement: SSL options removed as it’s now used by default, including with thumbnails and schema.org links
  • Enhancement: Improved the RSS feed output for search or user upload requests
  • Maintenance: Removed some deprecated elements in the code
  • Maintenance: Updated includes so that plugin folders were not hardcoded
  • Maintenance: Updated which functions I was using to retrieve folder names so that they are fully SSL compatible
  • Maintenance: Removed a load of redundant functions
  • Maintenance: Replaced a function with a PHP command but this means that the plugin is no compatible with PHP versions below 5.1
  • Maintenance: Tidied up the list screen further
  • Maintenance: Replaced the ‘dynamic’ parameter with ‘responsive’ which, as a name, is far more accurate. ‘dynamic’ will still work, though.
  • Maintenance: Improved admin screen validation and sanitization

4.1.1

  • Bug fix: Corrected settings URL in plugin meta.
  • Bug fix: If plugin has never run before, ensure a default options array is generated.
  • Maintenance: Removed donation options and updated branding.

4.1

  • Enhancement: Added ‘Plays inline’ option for iOS devices.
  • Enhancement: Added extra Closed Caption option to better reflect how YouTube works – either on, off, or user default.
  • Enhancement: Added new option to force HTML5 playback (if available). This is an undocumented feature and, as such, may not actually work, depending on YouTube’s current mood. If YouTube aren’t going to support it then I’m certainly not going to so please don’t shout if it doesn’t work.
  • Enhancement: Lovely new icons for the lists page.
  • Enhancement: Improved the layout of the demo video on the profiles page.
  • Enhancement: Added a count to the profiles and lists screen to indicate how many are set up. Also showed on drop-down which of the profiles/lists are not defined.
  • Enhancement: Changes made to add compatibility with a3 lazy load.
  • Enhancement: Removed the caching – it created the output up to 3 times quicker but when that’s 0.005 seconds it’s not worth the hassle that comes with it. I started making performance improvements to compensate then realized it was such a big change that it would be best spun off as it’s own separate update – version 4.2. Look out for it.
  • Enhancement: Removed limitation of only being able to display up to 30 lists or profiles.
  • Enhancement: When you can select a profile from another screen (e.g. defining a profile to an alternative shortcode) then only defined profiles will be listed.
  • Enhancement: Added general option to specify the YouTube interface language as well as to suppress debug output in the resulting code.
  • Enhancement: Fixed validation errors against thumbnails.
  • Enhancement: Changed the “Frameborder” option to a more general “Improve Validation” which does, well, just that. It improves the generated markup so that it will validate better (if that’s your bag).
  • Enhancement: Added option to use a third party script to handle content resizing. Implemented iFrame Resizer v3.5.1 and FitVids.js 1.1.
  • Enhancement: If another plugin is using the same shortcode as this I now output a prompt in the admin area. Also added a setting to turn off this prompt just in case you’re using the secondary shortcode and are happy for this.
  • Enhancement: Re-written code for help screens, including adding more information and additional tabs.
  • Maintenance: Moved the settings page to, well, the Settings menu option. It makes sense.
  • Maintenance: Removed the enable of the JS API, which is now deprecated.
  • Maintenance: Improved the admin screen output code – had made it more WordPress standard in version 4 but got some of the code wrong.

4.0.2

  • Maintenance: Not really a bug, but in some circumstances I wasn’t initializing a variable used when generating the embed code. It worked fine but wasn’t best practice so fixed. Sloppy.
  • Maintenance: Modified the default parameters so new user videos should appear with the same options as on YouTube itself. Consistent.
  • Maintenance: I ABSOLUTELY refuse to call this a bug. But I was calling get_the_excerpt() to build some of the video meta data. For some reason, still unknown to me, other plugins were crashing as a result of it. I’ve removed it for now but am investigating the cause. Frustrating.
  • Enhancement: WMODE is now only added to the embed URL if it’s anything other than the default. Shrinkage.

4.0.1

  • Maintenance: Left some debug code in by mistake. Doh. Sometimes I’d forget my own head if it wasn’t screwed on…. Apologies to those affected.

4.0

  • Maintenance: Removed a number of redundant/broken features. Learn more.
  • Maintenance: Updated download link to use KeepVid.
  • Maintenance: Re-written admin screen to use WordPress standard method of displaying settings. Oh, and the widget settings too.
  • Maintenance: …speaking of which, revised the options available to widgets.
  • Maintenance: Merged many of the files where there wasn’t a huge amount of content.
  • Maintenance: Renamed menu slugs as they were too generic and may cause clashes with other plugins or themes that are silly enough to do the same thing.
  • Enhancement: Revised profile screen to make it clearer, via the art of the icon, which parameters are compatible with which embed type.
  • Enhancement: If you go a bit “ape” with the parameters and manual playlists, it’s possible to exceed the URL size limit. I’ve now put a check in place to report this, if it occurs.
  • Enhancement: Added modest branding as a parameter (before was only selectable via the profile screen).
  • Enhancement: Improved the meta data.
  • Bugs: Many of them. Fixed. Hoorah.

3.3.5

  • Maintenance: Added missing text domain, ready for automatic translation.

3.3.4

  • Maintenance: Updated admin screen headings for compatibility with 4.3.
  • Maintenance: Updated demo video on profile page. Just because.
  • Bug: Fixed (I hope) the problem with the editor button not appearing for some users. Thanks to Mark Aarhus for getting to the bottom of this for me.
  • Enhancement: Added donation link to plugin meta. Because I’m worth it.

3.3.3

  • Maintenance: Now working with newer playlist IDs (README instructions changed to reflect how to do this)
  • Maintenance: Resolved widget issues with version 4.3 of WordPress
  • Maintenance: Eliminated XSS problem in admin profile screen

3.3.2

  • Bug: One of the files was corrupt in the previous release – this is now fixed. Sorry ?

3.3.1

  • Maintenance: Remove reference to Google API, as videos are now not displaying as a result of v2 being retired. Will update the plugin more fully in future release

3.3

  • Maintenance: Ding, dong Applian has gone. Removed Vixy branding, updated README and language files to match
  • Maintenance: Removed those Vixy download links and restored the old method – will enhance this in a future release
  • Maintenance: Plugin had too much baggage so it could support old versions of WordPress. Why? Updated it to only support more recent versions but have removed lots of un-needed guff as well. The result – this version is 15% slimmer than the previous version. Win!
  • Maintenance: Spruced up the admin screens to match the new WordPress styling
  • Bug: Resolved a number of bugs as reported by users and spotted by myself. Thanks all! More fixes to come

3.2.1

  • Bug: Fixed issue where playlist was appearing for single videos
  • Maintenance: Improved Metadata standard

3.2

  • Bug: Prevented download bar SPAN from appearing even when switched off
  • Bug: Fixed issue that caused playlists to not appear
  • Enhancement: Added new shortcode for displaying video comments
  • Enhancement: IFRAME output now includes metadata
  • Enhancement: Editor button will now work with MCE4 editor (WP 3.9+)
  • Enhancement: SVG icon used in admin menu for WP 3.8+

3.1

  • Enhancement: Allow user to specify video resolution required (experimental)
  • Enhancement: Different languages can be specified for transcripts, other than the English default
  • Enhancement: API enabled on scripts by default, allowing for third-party modification
  • Enhancement: Can now add a link to YouTube under a video
  • Maintenance: Removed adverts from administration screen
  • Maintenance: Changed download bar default to be opt-in and re-worded option text

3.0.1

  • Bug: Fixed menu options shown in admin bar
  • Maintenance: Updated links to point to instructions on Vixy.net website
  • Enhancement: Validate download bar code to ensure it’s secure
  • Enhancement: Passing blog language to language bar for i18n

3.0

  • Maintenance: Changed name, updated adverts, removed donation and sponsorship requests
  • Maintenance: Renamed function to match new name and also removed prefix from files, which were not required
  • Maintenance: Checked and updated all help URLs
  • Maintenance: Removed about and instruction pages which were felt were no longer needed
  • Maintenance: Updated icons
  • Enhancement: Updated download links to use code from Vixy. This is now switched on by default
  • Enhancement: Added option to provide an affiliate ID for use with the download bar – blog owners can make 30% from sales generated
  • Enhancement: Simplified the menu access rules which has resulted in resolving a number of existing issues
  • Bug: Fixed PHP error when allowing shortcodes in widgets

Try other plugins

Yoast SEO icon

Yoast SEO

4.8 · 10M+ installs

Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using the Yoast SEO…