• 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 5 years, 6 months ago by webdee75.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    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

    (@webdee75)

    I embed the youtube iframe in the text tab.

    • This reply was modified 5 years, 6 months ago by webdee75.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I am suggesting that you NOT paste in the embed code, just the url of the video.

    Thread Starter webdee75

    (@webdee75)

    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)

    (@sterndata)

    Volunteer Forum Moderator

    Could be… localhost environments are strange. Do you get the right video when you publish?

    Thread Starter webdee75

    (@webdee75)

    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 5 years, 6 months ago by webdee75.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wrong YouTube iframe preview’ is closed to new replies.