Skip to content

How to Embed a YouTube Video in WordPress?

Key Takeaways

  • Video block embeds a YouTube video in the free Nexter Blocks plugin, and it uses only the video id after v=, not the full URL.
  • Privacy Mode switches the embed to youtube-nocookie.com and stops YouTube setting tracking cookies before anyone presses play.
  • Custom Layout replaces the embed with a thumbnail and loads nothing from YouTube until the visitor clicks, while one block handles one video only.
Table of Contents

Pasting a YouTube link into a page hands the visitor YouTube’s branding, its suggested videos and its cookies, all before they press play.

The Video block embeds the same video and lets you turn each of those off.

For every Video setting in one place, see the Video block guide.

Before You Start

  • Edition: Free — the Video block is in the free Nexter Blocks plugin.
  • Block to enable: Video, switched on under Nexter > Blocks in your WordPress dashboard.
  • The video id — the part of the YouTube URL after v=, not the whole address.
A real YouTube video embedded with the Video block

Steps

  1. Add the Video block to your page and click Design from Scratch.
  1. Set Source to YouTube.
The Source setting with YouTube, Vimeo and Self Hosted
  1. Paste the id into YouTube ID.
The YouTube ID field
  1. In Player Settings, switch Suggested Videos off so the end screen does not advertise other channels, and Modest Branding on.
The Player Settings panel
  1. Switch Privacy Mode on.
The Privacy Mode toggle
  1. Write an Iframe Title in the Accessibility panel.
The Iframe Title field

Privacy Mode switches the embed to youtube-nocookie.com — measured on the rendered page. It stops YouTube setting tracking cookies before anyone presses play, which is the single most useful toggle here for anyone with a cookie notice.

How It Behaves

  • Every toggle lands in the embed URL. Measured: Controls and Video Info off with Modest Branding and Suggested Videos on gave controls=0&showinfo=0&modestbranding=1&rel=1.
  • Privacy Mode changes the host to youtube-nocookie.com — confirmed on the rendered page.
  • Autoplay adds autoplay=1 and an allow="autoplay" permission on the iframe. Browsers still require the video to be muted.
  • Custom Layout replaces the embed with your own thumbnail and loads nothing from YouTube until the visitor clicks — measured, with no iframe on the page at all until then.

Limitations

  • It takes the id, not the URL. Pasting a whole address leaves the player blank.
  • Privacy Mode reduces cookies but the video is still served by YouTube, so it remains a third-party request to declare.
  • Suggested Videos off is not absolute. YouTube now shows videos from the same channel instead of hiding suggestions entirely.
  • One video per block. For a row of videos, use several blocks or a carousel.

Troubleshooting

The player is blank

You have pasted the whole URL. Use only the id from after v=.

Autoplay does nothing

Switch Mute on too — browsers block autoplay with sound.

I still see cookies from YouTube before anyone plays the video

Switch Privacy Mode on, and for nothing at all until a click, switch on Custom Layout so the thumbnail loads instead of the player.

Related Docs

Share your Thoughts

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

How do I embed a YouTube video in WordPress classic editor?

The cleanest path is to use the Video block, not a pasted YouTube URL. Nexter Blocks provides the Video block in the free plugin, and it takes the YouTube video id, not the full link. That matters because the block can also turn off Suggested Videos, enable Modest Branding, and switch on Privacy Mode so YouTube does less tracking before play.

How do I add video in WordPress Elementor?

The page points to the Nexter Video block as the embed method, and it works alongside major page builders. That makes it a practical option when you want a YouTube embed without relying on a raw URL paste. The key detail is that the block uses the video id and gives you controls for branding, suggestions, and privacy in one place.

How do I embed video in WordPress from media library?

This tutorial does not use the Media Library for YouTube embeds. It uses the Video block and asks for the YouTube id after v=, which is different from uploading or selecting a file from WordPress media. That distinction matters because pasting a whole address leaves the player blank, while the id lets the embed render correctly.

Why is my YouTube player blank in WordPress?

A blank player usually means the full YouTube URL was pasted instead of just the id after v=. The Video block expects only that id, so a full address breaks the embed. This is one of the easiest mistakes to make because the URL looks valid, but the block needs only the short identifier.

How do I stop YouTube cookies before anyone clicks play?

Privacy Mode is the setting that changes the embed to youtube-nocookie.com on the rendered page. That reduces tracking cookies before playback starts, which is why it is described as the most useful toggle for anyone dealing with a cookie notice. If you want even less loading before interaction, Custom Layout shows only your thumbnail until click.

What are the limitations of embedding YouTube videos with this block?

The main limits are simple: it takes an id, not a full URL; Suggested Videos off is not absolute because YouTube now shows videos from the same channel; and one Video block holds one video only. Privacy Mode also reduces cookies but still serves content from YouTube, so it remains a third-party request.

Last reviewed: September 28, 2026

Related Docs