Title: wrong YouTube iframe preview
Last modified: October 16, 2018

---

# wrong YouTube iframe preview

 *  [webdee75](https://wordpress.org/support/users/webdee75/)
 * (@webdee75)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/wrong-youtube-iframe-preview/)
 * Hi,
    Creating my 1st wp theme, I realize it is impossible to have a correct post
   preview if there is a YouTube iframe. When I edit the post, everything is OK.
   But if I want to see a preview during the post elaboration : I see a page with
   my front page inside the iframe instead of my YouTube video -> in the navigator
   console, I can see that the address of the iframe is missing, the src attribute
   is present, but with no value. Is there something to do to fix it ? (getting 
   rid of the #post-preview.preview.button would be my last solution…) Thanks for
   any help.
    -  This topic was modified 7 years, 8 months ago by [webdee75](https://wordpress.org/support/users/webdee75/).

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [7 years, 8 months ago](https://wordpress.org/support/topic/wrong-youtube-iframe-preview/#post-10785363)
 * How are you embedding the YT video in your post? WordPress knows about YouTube
   so all you need to is paste in the url of the video (e.g., `https://www.youtube.
   com/watch?v=xuyCdgpa5sY` ) on a line by itself and WP will handle it for you.
 *  Thread Starter [webdee75](https://wordpress.org/support/users/webdee75/)
 * (@webdee75)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/wrong-youtube-iframe-preview/#post-10785652)
 * I embed the youtube iframe in the text tab.
    -  This reply was modified 7 years, 8 months ago by [webdee75](https://wordpress.org/support/users/webdee75/).
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [7 years, 8 months ago](https://wordpress.org/support/topic/wrong-youtube-iframe-preview/#post-10785661)
 * I am suggesting that you NOT paste in the embed code, just the url of the video.
 *  Thread Starter [webdee75](https://wordpress.org/support/users/webdee75/)
 * (@webdee75)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/wrong-youtube-iframe-preview/#post-10785689)
 * I tried, it didn’t make any difference…
    By the way, I’m on localhost with mamp,
   could it be the reason…?
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [7 years, 8 months ago](https://wordpress.org/support/topic/wrong-youtube-iframe-preview/#post-10785696)
 * Could be… localhost environments are strange. Do you get the right video when
   you publish?
 *  Thread Starter [webdee75](https://wordpress.org/support/users/webdee75/)
 * (@webdee75)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/wrong-youtube-iframe-preview/#post-10785733)
 * When I publish, everything works fine.
    I also noticed that when I unwrap the
   youtube iframe from its p tags (jquery) I cannot get the preview, I have the 
   message “The link you followed has expired.”
    -  This reply was modified 7 years, 8 months ago by [webdee75](https://wordpress.org/support/users/webdee75/).

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘wrong YouTube iframe preview’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [webdee75](https://wordpress.org/support/users/webdee75/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/wrong-youtube-iframe-preview/#post-10785733)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
