Generate a WP post from Youtube Feed

If working with wp_insert_post and the youtube api is too much work, or too complicated, you may be interested in the plugin called “Automatic Youtube Video Posts” (AYVP). It has been working quite well for us. There are some bugs (nothing critical) and it is not the most efficient plugin, but it does exactly what … Read more

display only youtube video sticky post

When you call get_the_content() some filters aren’t applied like they would with the_content() so if you want your content to be formatted you have to use the following: $my_content = apply_filters( ‘the_content’, get_the_content() ) If you want to extract the youtube video out of your content you’ll have to detect the youtube link with a … Read more

WordPress and Youtube problem

Try embedding an iFrame. Go to the youtube video you’re trying to post. Click right > Copy embed code. Paste it in the HTML editor on wordpress. It should work without a plug in.

How to change src link in YouTube?

function add_embed_filter($html) { return ‘<div class=”js-video widescreen”>’.str_replace(“?feature=oembed”, “?html5=1”, $html).'</div>’; } add_filter( ’embed_oembed_html’, ‘add_embed_filter’, 50, 1); Of course if WordPress or Youtube change how this url is constructed you will have to adapt your code accordingly, but I tested it, and this will get you there with WordPress 3.8.1. I also did not test how this … Read more

YouTube API 403 error when website restriction set

If you restrict the application (or API key) by HTTP referrers, then your remote HTTP request should include a valid HTTP_REFERER header, which wp_remote_get() does not set by default. And you can set the header using the headers argument like so where the array key is referer (note that it’s not double “r” as in … Read more

How do I embed a YouTube video in WordPress 3.0?

According to the docs: http://codex.wordpress.org/Embeds as long as you have “Auto-embeds” checked in Administration > Settings > Media SubPanel you can paste in the youtube url and if it’s on its own line the video should be embedded. Alternatively you can wrap it in the embed short code e.g.