VideoEmbed YouTube

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

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.

Custom iFrame for Elementor WordPress plugin by Coderz Studio showing 3000+ active installations on the plugin repository page
Custom iFrame for Elementor WordPress plugin by Coderz Studio showing 3000+ active installations on the plugin repository page

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


Also Available For