---
title: "How to Embed a YouTube Video in WordPress?"
url: https://nexterwp.com/docs/embed-a-youtube-video-in-wordpress/
date: 2024-12-11
modified: 2026-09-28
lang: en
author: "Aditya Sharma"
description: "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..."
image: https://nexterwp.com/wp-content/uploads/2024/12/How-to-Embed-a-YouTube-Video-in-WordPress_-1024x519.jpg
word_count: 417
---

# 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.

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](https://nexterwp.com/docs/add-videos-in-wordpress/).*

[LIVE BLOCK LINK](https://nexterwp.com/nexter-blocks/blocks/wordpress-video-player/)

## 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](https://nexterwp.com/wp-content/uploads/2026/09/video-youtube-embed-fe.webp)

## Steps

- Add the **Video** block to your page and click **Design from Scratch**.

- Set **Source** to **YouTube**.

![The Source setting with YouTube, Vimeo and Self Hosted](https://nexterwp.com/wp-content/uploads/2026/09/video-source.webp)

- Paste the id into **YouTube ID**.

![The YouTube ID field](https://nexterwp.com/wp-content/uploads/2026/09/video-youtube.webp)

- In **Player Settings**, switch **Suggested Videos** off so the end screen does not advertise other channels, and **Modest Branding** on.

![The Player Settings panel](https://nexterwp.com/wp-content/uploads/2026/09/video-player.webp)

- Switch **Privacy Mode** on.

![The Privacy Mode toggle](https://nexterwp.com/wp-content/uploads/2026/09/video-privacy.webp)

- Write an **Iframe Title** in the Accessibility panel.

![The Iframe Title field](https://nexterwp.com/wp-content/uploads/2026/09/video-a11y.webp)

> ***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

- [Video block: all settings](https://nexterwp.com/docs/add-videos-in-wordpress/)- [Embed a Vimeo video](https://nexterwp.com/docs/embed-a-vimeo-video-in-wordpress/)- [Create a video popup](https://nexterwp.com/docs/create-a-video-popup-in-wordpress/)

## Frequently Asked Questions

**Q: How do I embed a YouTube video in WordPress classic editor?**
A: 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.

**Q: How do I add video in WordPress Elementor?**
A: 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.

**Q: How do I embed video in WordPress from media library?**
A: 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.

**Q: Why is my YouTube player blank in WordPress?**
A: 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.

**Q: How do I stop YouTube cookies before anyone clicks play?**
A: 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.

**Q: What are the limitations of embedding YouTube videos with this block?**
A: 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.
