When Google comes calling…

Its almost never about technology. Many companies that are built on tech believe that its the tech that enabled them to succeed. This is almost never true I know, Im biased. Its marketing and stories and connection and tribes and commitment and structure that build businesses. The technology is essential, but its not nearly enough.

via Seths Blog: When Google comes calling….

YouTube Embederrator

Needed a simple WordPress function to provide a way to build a YouTube video embed. This is a nice little trick. All you need to do is add a custom field that has a key of Big_Video and the value of the ID of the YouTube video.

function js_youtube_embed($width,$height) {
global $wp_query;
$big_video = get_post_custom_values(‘Big_Video’);
<iframe width="<?php echo $width; ?>" height="<?php echo $height; ?>" src="http://www.youtube.com/embed/<?php echo $big_video[0]; ?>?showinfo=0&hd=1" frameborder="0" allowfullscreen></iframe>
<?php } ?>

Example, if this is your YouTube video: http://www.youtube.com/watch?v=C1p6A7X64Qg, you would use C1p6A7X64Qg as the value.

In you template, the function would look like this:

js_youtube_embed(‘940’, ‘528’);

The two values are the size of the video that you want embedded. So, in this case 940×528.