View Single Post
Old 09-16-2010, 01:13 AM  
StariaDaniel
Confirmed User
 
Join Date: Oct 2007
Location: Netherlands
Posts: 415
Quote:
Originally Posted by vittle View Post
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
StariaDaniel is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote