Title: YouTube Embedding Code
Last modified: January 5, 2024

---

# YouTube Embedding Code

 *  Resolved [baermktg](https://wordpress.org/support/users/baermktg/)
 * (@baermktg)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/youtube-embedding-code/)
 * I’m trying to embed this iframe from YouTube into WPcode to get a shortcode to
   add to a web page.
 * <iframe width=”647 height=”358″ src=”[https://www.youtube.com/embed/kWRF9-ER1ek?si=TXNJFnPVJkkT7k-R&controls=0&#8243](https://www.youtube.com/embed/kWRF9-ER1ek?si=TXNJFnPVJkkT7k-R&controls=0&#8243);
   title=”YouTube video player” frameborder=”0″ allow=”accelerometer; autoplay; 
   clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share” allowfullscreen
   ></iframe>
 * I get three errors.
   “Special characters must be escaped : [ < ]”“Special characters
   must be escaped : [ > ]”“Special characters must be paired, no start tag: [ </
   iframe> ]”
 * I’ve tried multiple ways to accommodate this, but it doesn’t work. It appears
   to only work if I use [ <iframe > ] all of the parameters [ </iframe > ] and 
   that won’t work for embedding a YouTube video.
   Any sage advice out there? Thanks!

Viewing 1 replies (of 1 total)

 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/youtube-embedding-code/#post-17323756)
 * Hi [@baermktg](https://wordpress.org/support/users/baermktg/),
 * Can you please make sure that the Code Type of the snippet you are trying to 
   create is set to “HTML”? That should have no problem supporting iframe codes.

Viewing 1 replies (of 1 total)

The topic ‘YouTube Embedding Code’ is closed to new replies.

 * ![](https://ps.w.org/insert-headers-and-footers/assets/icon-256x256.png?rev=2758516)
 * [WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager](https://wordpress.org/plugins/insert-headers-and-footers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-headers-and-footers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-headers-and-footers/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-headers-and-footers/reviews/)

## Tags

 * [embed video](https://wordpress.org/support/topic-tag/embed-video/)
 * [iframes](https://wordpress.org/support/topic-tag/iframes/)
 * [Youtube](https://wordpress.org/support/topic-tag/youtube/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/youtube-embedding-code/#post-17323756)
 * Status: resolved