• Hi,

    I’m trying to embed a youtube video on my site, but when I save changes it appears only as a URL (scroll right to the bottom of the page to see).

    I went to this WordPress Support page which says you only have to paste in the URL and it should automatically embed, but it isn’t.

    FYI, I’m using a child theme of Superhero, and trying to embed with the PageBuilder plugin (I’ve tried it on a normal page too and the same problem persists).

    I’m sure it’s something simple, but any help will be massively appreciated!

Viewing 15 replies - 16 through 30 (of 30 total)
  • Same for me as Ikalif.

    This code worked for me

    [video src="http://www.youtube.com/watch?v=oHg5SJYRHA0"]

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    That code can only work if you have a plugin that supports that the video short code.

    This will always work on WordPress:

    [embed]http://www.youtube.com/watch?v=oHg5SJYRHA0[/embed]

    But that explicit [embed]...[/embed] shouldn’t be necessary. Just copy and paste the URL to a new line by itself.

    That should just work but if it doesn’t then wrap it in embed as above.

    I tried that code on my WordPress but the result was no video on the post, only an active link was appearing. I only got it to work with the code that I described above.

    [embed] doesn’t work too for me. I get a link.

    It works on my development server at home but not on my hosted virtual machine. When I paste an URL, I can see a progress bar for a while then the url is just pasted as normal text. Server has no firewall rule on the out interface.

    Interesting finding, the request fails on the hosted server: Trying “wget http://youtu.be/ErLpzD-O6ZY”

    On Dev server:
    **************

    [mrechte@linux2 ~]$ wget http://youtu.be/ErLpzD-O6ZY
    –2014-10-21 17:06:22– http://youtu.be/ErLpzD-O6ZY
    Résolution de youtu.be (youtu.be)… 173.194.41.36, 173.194.41.32, 173.194.41.40, …
    Connexion à youtu.be (youtu.be)|173.194.41.36|:80… connecté.
    requête HTTP transmise, en attente de la réponse… 302 Found
    Emplacement : http://www.youtube.com/watch?v=ErLpzD-O6ZY&feature=youtu.be [suivant]
    –2014-10-21 17:06:22– http://www.youtube.com/watch?v=ErLpzD-O6ZY&feature=youtu.be
    Résolution de http://www.youtube.com (www.youtube.com)… 74.125.206.136, 74.125.206.93, 74.125.206.91, …
    Connexion à http://www.youtube.com (www.youtube.com)|74.125.206.136|:80… connecté.
    requête HTTP transmise, en attente de la réponse… 200 OK
    Taille : non indiqué [text/html]
    Sauvegarde en : « ErLpzD-O6ZY.1 »

    [ <=> ] 172 922 182KB/s ds 0,9s

    2014-10-21 17:06:23 (182 KB/s) – « ErLpzD-O6ZY.1 » sauvegardé [172922]

    On hosted server:
    ****************
    [root@vps97604 ~]# wget http://youtu.be/ErLpzD-O6ZY
    –2014-10-21 17:01:31– http://youtu.be/ErLpzD-O6ZY
    Résolution de youtu.be (youtu.be)… 2a00:1450:4007:806::1002, 173.194.45.64, 173.194.45.65, …
    Connexion vers youtu.be (youtu.be)|2a00:1450:4007:806::1002|:80…connecté.
    requête HTTP transmise, en attente de la réponse…403 Forbidden
    2014-10-21 17:01:35 ERREUR 403: Forbidden.

    One can notice that it uses ipV6 on the hosted server.

    Disabling ipv6 on the hosted server solves this error but does not solve the WP issue 🙁

    Digging little bit more in the oEmbed protocol (http://oembed.com/) it seems the request to submit to youtube for the above video is:

    http://www.youtube.com/oembed/?url=http%3A//youtu.be/ErLpzD-O6ZY

    Which returns the expected file on my hosted server:

    [root@vps97604 ~]# wget http://www.youtube.com/oembed/?url=http%3A//youtu.be/ErLpzD-O6ZY
    –2014-10-21 17:34:22– http://www.youtube.com/oembed/?url=http%3A//youtu.be/ErLpzD-O6ZY
    Résolution de http://www.youtube.com (www.youtube.com)… 173.194.45.69, 173.194.45.70, 173.194.45.71, …
    Connexion vers http://www.youtube.com (www.youtube.com)|173.194.45.69|:80…connecté.
    requête HTTP transmise, en attente de la réponse…200 OK
    Longueur: non spécifié [application/json]
    Sauvegarde en : «index.html?url=http:%2F%2Fyoutu.be%2FErLpzD-O6ZY»

    [ <=> ] 573 –.-K/s ds 0s

    2014-10-21 17:34:23 (28,5 MB/s) – «index.html?url=http:%2F%2Fyoutu.be%2FErLpzD-O6ZY» sauvegardé [573]

    [root@vps97604 ~]# cat index.html\?url\=http\:%2F%2Fyoutu.be%2FErLpzD-O6ZY
    {“type”: “video”, “provider_name”: “YouTube”, “width”: 459, “height”: 344, “thumbnail_width”: 480, “title”: “QUICK UK 600 700 CHINESE WEIGHT TEST”, “author_name”: “ROBRENZ”, “version”: “1.0”, “author_url”: “http:\/\/www.youtube.com\/user\/ROBRENZ”, “provider_url”: “http:\/\/www.youtube.com\/”, “thumbnail_height”: 360, “html”: “\u003ciframe width=\”459\” height=\”344\” src=\”http:\/\/www.youtube.com\/embed\/ErLpzD-O6ZY?feature=oembed\” frameborder=\”0\” allowfullscreen\u003e\u003c\/iframe\u003e”, “thumbnail_url”: “http:\/\/i.ytimg.com\/vi\/ErLpzD-O6ZY\/hqdefault.jpg”}

    It is very simple to do go to youtube check there is an option below the video which say share click it you will see the option embedd click that embedd option you will see a string like this <iframe width=”560″ height=”315″ src=”//www.youtube.com/embed/8aVkMy93a_s” frameborder=”0″ allowfullscreen></iframe>

    copy the string and then goto your site open the post and in text editor mode paste it like this Candytech video smartphone google gesture

    Just posted a new topic…
    Same problem : worked before, now no.

    Will ask my webhosting company.

    Anyway, iframe embedding works, even if it is not… visual embedding 😉

    Same problem. If I copy the embed code directly into WP 4.0 post it just shows as text once published.

    I surrounded the share URL with the embed wrapping and that gives me an active link but still won’t embed the actual video.

    Any suggestions?

    hi
    plz check that ur url for video is correct.

    To quickly embed a YouTube video, simply copy the video’s URL from your web browser’s address bar while viewing the video:

    ex:http://www.youtube.com/watch?v=dQw4w9WgXcQ

    Also, you can optionally wrap the URL in the [embed] shortcode. It will accomplish the same effect, but does not require the URL to be on its own line. It also allows you to set a maximum (but not fixed) width and height,
    like so:
    [embed width="123" height="456"]http://www.youtube.com/watch?v=oHg5SJYRHA0[/embed]

    ref:
    -http://www.wikihow.com/Embed-a-YouTube-Video-Into-a-WordPress-Blog
    -http://codex.ww.wp.xz.cn/Embeds

    hi
    this is NOT a problem with people incorrectly using the wrong URL. I have the same problem. Check out this video of it:
    https://www.dropbox.com/s/y042q9otmhv6jlh/wordpress%20wont%20embed.mp4?dl=0

    If I Paste the link, I get the little image embedding icon but then it reverts to text.

    If I use [embed] tags I see an error when I Save Draft and only a link when I publish. I have disabled all plugins and have tried this with TwentyFourteen active (not shown in the video)

    I made the switch to WP YouTube Lyte plugin and I’m not having issues anymore (and it doesn’t weight the website down quite as much).

    I found out though that one of the caching plugins was sometimes breaking the links that the embed code was using, so the problem could be linked to another plugin you are using disrupting the code.

    FYI, I have absolutely nothing changed and now it works!
    This is incomprehensible!

    Old thread, but stumbled across it as had same problem, and for was a different fix. Checking text view, the YouTube link was surrounded by <span>—</span> tags, removed them and hey presto.

Viewing 15 replies - 16 through 30 (of 30 total)

The topic ‘Embed youtube video not working’ is closed to new replies.