Embed YouTube Video in Gutenberg
Step-by-step guide to embed YouTube video in Gutenberg using the Custom iFrame WordPress plugin. Control autoplay, captions, and playback. No coding required.
Overview
Custom iFrame lets you embed YouTube video in Gutenberg by pasting any YouTube URL into the block. Free users get a working player. Pro users unlock autoplay, loop, captions, playback controls, and more.
Custom iFrame is a WordPress plugin by CoderzStudio that embeds 100+ external sources in Elementor and Gutenberg without writing any code.
Using Elementor instead? Follow the Embed YouTube Video in Elementor guide.
Requirements
- Custom iFrame plugin installed and active
- WordPress with the Gutenberg block editor
- A YouTube video URL to embed
Step 1: Get the YouTube Video URL
Open YouTube
Go to youtube.com and find the video you want to embed.
Copy the share link
Click the Share button below the video. Click Copy to copy the link to your clipboard.
Step 2: Install the Plugin and Add the Block
Install and activate the plugin
Go to your WordPress dashboard. Go to Plugins > Add New. Search for Custom iFrame by Coderz Studio, click Install Now, then click Activate.

Open your page in the block editor
Go to the page or post where you want the video. Click Edit to open the Gutenberg block editor.
Add the Custom iFrame block
Click the Add Block button. Search for Custom iFrame. Click the block to add it to the page.
Step 3: Embed YouTube Video in Gutenberg
Select YouTube as the source type
Select the Custom iFrame block. In the right panel, find Source Type and select YouTube.
Paste the YouTube URL
Paste the copied URL into the Source URL field. The video player appears inside the block in the editor.
Set height and publish
Set a Height (450px works for most videos) or enable Auto Height. Click Update or Publish.
Step 4: Configure Advanced Playback (Pro)
The options below require Custom iFrame Pro (Starter, Studio, or Agency plan). View pricing — plans start at $29 one-time.
Autoplay: Start the video automatically. Enable Mute alongside Autoplay — browsers require it.
Mute: Silence the video by default. Use with Autoplay or for background videos.
Show Controls: Display play, pause, and volume controls.
Loop: Repeat the video continuously.
Privacy Mode: Use youtube-nocookie.com to avoid tracking viewers via cookies.
Start Time / End Time: Set where playback begins and ends (in seconds). Useful for skipping intros or limiting clip length.
Show Closed Captions: Display captions by default. Improves accessibility.
Click Update or Publish. Your YouTube video is now live on your WordPress site.
For a full list of all YouTube advanced controls available in Pro, see the YouTube Advanced Controls guide. For all block settings, see the Set Up Custom iFrame in Gutenberg guide.
This guide showed you how to embed YouTube video in Gutenberg using the Custom iFrame plugin. From copying the video URL to selecting YouTube as the source type and publishing, the whole setup runs through the block editor without any code.
FAQ
No. Basic YouTube embedding works with the free version. Pro adds autoplay, loop, captions, playback controls, playlists, and advanced API support.
Browsers block autoplay for videos with sound. Enable the Mute toggle alongside Autoplay. The video starts silently and viewers can unmute manually.
Yes with Pro. Add comma-separated video IDs to the Playlist field in the Pro playback settings.
For a 16:9 video at full width, 450px to 500px works well. Enable Auto Height to let the iframe resize automatically with the content.
Also Available For
Embed YouTube in Elementor
Guide for the Elementor widget.
Embed YouTube Shorts in Gutenberg
Embed vertical YouTube Shorts in Gutenberg.
Related Guides
Last updated today
Built with Documentation.AI