Importing YouTube comments into your Wordpress blog
So you just embedded a YouTube video in your Wordpress post and people are commenting on it… on YouTube – oops!
You probably don't want half your comments on YouTube and the half on your post. Thankfully, there's a plugin for that!
Genki Wordpress Plugin
The Genki YouTube Comments Wordpress plugin imports YouTube comments into your Wordpress posts. It's great for keeping the conversation on your blog. You can schedule comments to be imported at regular intervals or import them manually through the Admin interface.
For any post that you want to import YouTube comments into, you just add a Custom Field with youtubevidid as the key and the actual YouTube Video ID of your video as the value.
Making it pretty: adding a YouTube Gravatar
By default, the imported comments use the default Gravatar. If you want to use a custom gravatar, instead, hack the code to change the email address used for imported posts to email@example.com:
$comment_author_email = 'firstname.lastname@example.org';
I registered this Gravatar account and mocked up a quick YouTube icon for it. Feel free to use it.
By the way, I also removed the default (and butt-ugly) " [..YouTube..] " prefix that the plugin adds to comments:
$comment_content = addslashes($ytvideo->CONTENT->_text);
You can see the plugin at work on my Star Trek: The Movie on USB Stick post.