Plugins to embed YouTube videos in your website

Embeds for YouTube: Embed YouTube videos quickly and concisely, auto-responsive, playlists, and more.

Plugin overview

The goal of “Embeds for YouTube” is to provide a relatively rich set of control options (shortcodes, playlists, video information, SEO metadata, etc.) on a simple and easy-to-use basis.

The current version (as of latest) is 5.4, compatible with a wide range of WordPress and PHP versions (generally requires WP ≥ 4.6, PHP ≥ 7.4, etc.).

Core features:

Here are some notable features of this plugin:

FunctionDescription
Shortcodes are embedded in the videoUse [youtube]video[/youtube] a shortcode to insert a video.  video Here it can be the ID or full URL of the YouTube video.
Playlist supportYou can insert YouTube’s own playlist, or you can define a “list” to save multiple video IDs/URLs, and then call it through a shortcode to play it in different orders (random, sequential, pick only one random, etc.).
Multiple parameter controlThere are many options that can be set in the shortcode or in the profile, such as whether to autoplay, whether to display controls, subtitles (cc), start/end time (start/stop), whether to be responsive, whether to ratio, etc.
Responsive/dynamic dimensionsFor responsive websites, you can set the video to automatically adapt to the width and the scale to automatically calculate the height.
ProfilesMultiple Profiles can be created to preset a set of video display/playback parameters. This allows different sections (inside the article, sidebar, widget, etc.) to use different styles.
Video ThumbnailSupport inserting video thumbnails with short codes [youtube_thumb]id[/youtube_thumb] , click to jump to YouTube. You can also specify the thumbnail version (e.g., “medium”, “high”, “maxres”, etc.), as well as width, height, etc.
Video information outputThere is a shortcode that outputs information such as the title, description, thumbnail URL, etc. of the video (replace the tags with the template %title% ). vinfo 
SEO-friendlyThe plugin supports fetching information through the YouTube API and adding it to the output metadata for search engine recognition and indexing.
CompatibilitySupport lazy load, support sharing with other plugins (such as Video SEO, a3 lazy load, Turn Off the Lights, etc.) without conflict.

Pros:

  • High flexibility: Short code + profiles + multi-parameters can control many details of the embedded video, suitable for scenes with special requirements for video display.
  • Responsive support: Suitable for modern designs without display issues on mobile devices due to fixed-size videos.
  • SEO and performance considerations: API pulls video information, generates metadata; There is a caching mechanism; support lazy loading, etc., which is conducive to improving speed and page loading experience.
  • Manageable😛 rofiles and lists allow you to set templates or styles for different scenes without having to repeat parameters every time.

Limitations and precautions

  • Dependency on YouTube API Keys: Some features, such as accurate video metadata, are limited without an API Key.
  • Some parameters have limitations in different environments, such as autoplay on iOS is often limited by the system or browser.
  • URL Length Limitation Issues: If the playlist is long or has many parameters, the generated embed URL may exceed the maximum length accepted by the browser/YouTube, leading to an error.
  • Shortcode conflicts: If your website or other plugins [youtube]...[/youtube] also use this shortcode, there may be conflicts. This plugin provides the option to use alternate shortcodes to solve this problem.
  • Video resolution/quality control limits: Although parameters allow you to set many options, the final YouTube player will choose the playback version based on the user’s device, network conditions, and YouTube’s policies, and you cannot fully control the clarity of the playback.

Suitable for the scene

This plugin is suitable for the following scenarios:

  • You have a lot of YouTube videos inserted into your website and want them to be consistent in style (size, controls, subtitles, playback controls, etc.).
  • You have multiple placements (article body, sidebar, widget area, etc.) and you want to set a different style for each placement.
  • I want to use short codes to flexibly control video behavior (e.g., autoplay, loop, subtitles, etc.) without writing too much code.
  • Hopefully, video embedding will help SEO a little, like automatically adding metadata or video snippets.
  • You want to display the video through the thumbnail and click on the thumbnail to load the video to reduce the load of the page.

How to use/configure basic steps

  1. Install and enable the plugin in your WordPress backend.
  2. Optionally, fill in the YouTube API key in the plugin settings to enable video data pulling and other functions.
  3. Set default options in Settings → Embeds for YouTube, such as default video size, whether the default is responsive, whether certain parameters are turned on, etc.
  4. If you need a different style, you can create additional profiles in Profiles. For example, one profile is used for the body of the article, and one is used for the sidebar widget.
  5. Use shortcodes to insert videos in pages/articles, such as:

[youtube] VIDEO_ID_OR_URL[/youtube]

Or in the form with parameters:

[youtube width=500 height=300 autoplay=yes controls=1]VIDEO_ID[/youtube]

Use the Lists function to manage multiple videos, a list can be called up by a shortcode to play multiple videos or to play them in order/shuffle, etc.

If you want to show a thumbnail instead of embedding it directly into the video, you can use [youtube_thumb]…[/youtube_thumb] shortcodes.

Plugin address: https://wordpress.org/plugins/youtube-embed/

Tubing:

Scroll to Top