changed it up from the above recommendations, but still getting the blank image below the vid.
Code:
<?php if((get_post_meta($post->ID, "video", true))) { ?>
<?php echo get_post_meta($post->ID, "video", true); ?>
<?php } else if((get_post_meta($post->ID, "image", true))) { ?>
<?php
$images = array(
'example.jpg',
'example.jpg',
'example.jpg',
'example.jpg',
);
$image = $images[array_rand($images)];
$output = "<img src=\"http://examplesite.com/images/random/" . $image . "\" />";
echo $output;
?>
<?php } ?>
Bookmarks