admin管理员组文章数量:1391955
I am unable to successfully embed (certain) YouTube URLs into my theme in the back end, with the intention of having viewable video clips on the front end. Not sure if this a WordPress issue or an issue with the video URLs themselves. I am using Divi, but have confirmed the problem is the same with Gutenberg and the Twenty Twenty theme.
All videos in question play fine on YouTube itself.
If I choose a random trending video from YouTube, the embed works fine. If I use one of my client's videos, nothing shows up on the front end.
Example probem video from my client:
Example working video, a random video chosem from youTube:
Any ideas what might be going on?
**EDIT: Note that the issue is only for client-created videos. Random YouTube videos embed and play fine.
I am unable to successfully embed (certain) YouTube URLs into my theme in the back end, with the intention of having viewable video clips on the front end. Not sure if this a WordPress issue or an issue with the video URLs themselves. I am using Divi, but have confirmed the problem is the same with Gutenberg and the Twenty Twenty theme.
All videos in question play fine on YouTube itself.
If I choose a random trending video from YouTube, the embed works fine. If I use one of my client's videos, nothing shows up on the front end.
Example probem video from my client: https://www.youtube/watch?v=rLZhyfkgHvs
Example working video, a random video chosem from youTube: https://www.youtube/watch?v=B3MDJsggfDg
Any ideas what might be going on?
**EDIT: Note that the issue is only for client-created videos. Random YouTube videos embed and play fine.
Share Improve this question edited Feb 13, 2020 at 17:01 clg asked Feb 10, 2020 at 21:55 clgclg 31 silver badge3 bronze badges1 Answer
Reset to default 0I had recently similar issue with Divi and embedding videos. At the end I realized its because oEmbed issues in WordPress sites running on host with both IPv4 and IPv6 sites.
Either you can add this code to your functions.php to fix this:
add_action( 'http_api_curl', function( $curl_handle ) {
curl_setopt( $curl_handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
});
Or you can download the same solution as a plugin I made - the site is in Czech Language, but it will lead to downloading very simple plugin doing the same thing
本文标签: Can39t embed certain youtube videos into theme
版权声明:本文标题:Can't embed certain youtube videos into theme 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744750426a2623142.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论