YouTube Embed

0 次阅读

Go back to the list of Blocks

Using the YouTube Embed block you can include a YouTube video into your post/page with play buttons, so your visitor can stay on your site to watch it.

You don’t need a YouTube account to embed a video.

Not all videos can be shared this way, though. The publisher needs to “Allow Embedding” in the settings of the video and some publishers restrict the countries, where videos can be shared.

This setting can be found YouTube Studio:
Edit Video > More Options > Check “Allow embedding

Non-personal identifying viewing data will be shared with YouTube and the publisher of the video. Please consult the privacy policies and information on YouTube if your site is visited by children.

Six Steps to embed a YouTube Video in your post or page

  1. Find your video on, and copy the URL of the video from the browser bar
  1. Add a YouTube Embed block to your post.
Adding a block via the “Slash” command from an empty row

Detailed instructions on adding blocks can be found here.

  1. Paste the YouTube URL from Step 1
  2. Click on the “Embed” Button
  1. You see the YouTube video in your editor.
  1. Clicking on Preview, will show you the display on the front end of your page.

Embed other YouTube links


A playlist URL can be embedded and the first video of the list shows in the embed box, with an additional navigation for the playlist in the top right corner.

Not all YouTube links can be used for an embed. When an URL is used that is not suited for embedding, the Block editor offers you two options: to try a different URL or convert the current URL into a Text link.

Block Toolbar

Besides the “Mover” and “Drag & Drop Handle” on the left side, the Block Toolbar for the YouTube embed shows four buttons:

  • Transform to
  • Change alignment
  • Edit URL, and
  • More Options. 

Transform to:

You can transform a YouTube embed block to a Group. This would give you the ability to change the background color around the YouTube embed.

Change Alignment

  • Align left – Make the YouTube post left aligned
  • Align center – Make the YouTube post alignment centered
  • Align right – Make the  YouTube post align right
  • Wide width – Increase the width of the post beyond the content size
  • Full width – Extend the YouTube post to cover the full width of the screen.

“Wide width” and “Full width” alignment need to be enabled by the Theme of your site. 

Edit URL

Via the edit URL, you can change the YouTube Embed URL in the embed block. Overwrite the existing URL and click on the “Embed” button on the right.

More Options:

Hide Block Settings

TheHide Block Settings option hides (or shows) the Block Setting panel in the editor’s sidebar.


Copy can be used to copy a selected block and then you can paste it wherever you want in the editor.


Duplicate can be used to duplicate selected block.

Insert Before

Insert a new block before the selected block(s).

Insert After

Insert a new block after the selected block(s).

Move To

If you select Move To, you will get a blue line inside your content, you can then use the arrows to move that line up and down to where you want the selected content to be moved into, hitting return on your keyboard at that point moves the block to that position.

Edit as HTML

TheEdit as HTML option allows you to modify the HTML code of the embed block.

Add to Reusable blocks

Using the Add to Reusable blocks option lets you add the selected block to a list of reusable blocks, so you can use them on other posts or pages as well.


Select the Group option if you want to create a group of blocks and treat them as a unit. You can for instance add a common background color or other blocks to the group.

Remove Block

With the Remove Block option, you can delete the selected block from your content.


Besides the “Advanced” section, the YouTube embed has only one setting in the “Block Settings” sidebar: Media Settings.

Media Settings

Via the Media Settings you can control the behavior of your post embed when viewed from a smaller device, like on a phone screen.

The Toggle switch turns on or off the resize functionality for smaller devices. The default setting is “on” or blue.

“Off:” This embed may not preserve its aspect ratio when the browser is resized. In the off position the toggle switch is gray.

“On:” This embed will preserve its aspect ratio when the browser is resized. The toggle switch turns blue in the “On” position.


The advanced tab lets you add a CSS class to your block, allowing you to write custom CSS and style the block as you see fit.

The advanced section lets you add a CSS class to your block.

For a YouTube embed there are default CSS classes to allow for responsive handling of the embed when viewed on smaller devices like mobile phones.


  • Updated 2020-08-18
    • Replaced “More Options” – new screenshot
    • Added “Move To” and “Copy” section under More Options
  • Updated 2020-05-26
    • Fixed some typos
  • Created 2020-04-21