• Resolved aca529

    (@aca529)


    I cannot embed a YouTube video into a post.

    Here is the code:

    <object width="425" height="344"><param name="movie" value="https://www.youtube.com/v/OM3Z_Kskl_U&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="https://www.youtube.com/v/OM3Z_Kskl_U&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

    When I save the post, the above code turns into:

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="https://www.youtube.com/v/OM3Z_Kskl_U&amp;hl=en&amp;fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="https://www.youtube.com/v/OM3Z_Kskl_U&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object>

    I just see a big black box when I publish the page.

    What is going on here? How can I fix this? I am using WordPress 2.6.5.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You have to use the code editor to embed a youtube script – changing to visual before publishing will wipe the code and render it useless. In addition, the <embed> tag is missing from your initial code – though you do have the closing </embed> tag.

    Read more carefully. His first embed tag isn’t missing at all. ??

    Also, the way WordPress messes with YouTube insertion code is infuriating. I use this generator to convert YouTube URLs to valid XHTML. And what does the WordPress editor do? It breaks it and makes a mockery of the “Valid XHTML 1.0” link on my sidebar.

    It’s all very well saying “don’t hit the visual tab” before publishing because that will break it again, but it only takes a future edit while forgetting that fact to break the code again.

    Really. Is there a way to stop WordPress modifying YouTube links without modifying core files? To say it’s a PITA is understatement of the year (certainly if you blog a lot of videos).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘YouTube embed’ is closed to new replies.