Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* Set variables and create if statement */
- $videotype = get_post_meta($post->ID, 'Video Type', single);
- $videoid = get_post_meta($post->ID, 'Video ID', single);
- $selected_id = get_the_ID();
- if ($videotype == 'vimeo') {
- echo '<iframe src="http://player.vimeo.com/video/'.$videoid.'" width="980" height="551" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
- }
- else if ($videotype == 'youtube') {
- echo '<iframe width="980" height="551" src="http://www.youtube.com/embed/'.$videoid.'?hd=1&rel=0&autohide=1&showinfo=0&autoplay=1" frameborder="0" allowfullscreen></iframe>';
- }
- else {
- echo 'Please Select a Video type.';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement