Quote:
Originally Posted by vittle
nice work! What about space for a sample video in the review section?
|
Actually you can do that pretty easily, you just have to add another field to the array $meta_box in the theme's functions.php and it'll show up when adding/editing posts.
for example:
Code:
array(
'name' => 'Sample Video',
'desc' => 'Enter the URL to sample video',
'id' => $prefix . 'samplevideo',
'type' => 'text',
'std' => 'http://'
),
Then you edit the single.php (Single Post Template), and add something like that where you want to show the video:
Code:
<?php
$video = get_post_meta($post->ID, "rp_samplevideo",true);
if($video != ''){
print '<your><video><html-code>'.$video.'</html-code></video></your>';
}
?>
I've added sample images to the review this way. Should work for a video too, allthough JW Player or another flash player obviously takes a little bit more code than an image
