SHARE
TWEET

VCPT PHP

keihead Jul 3rd, 2013 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /* Set variables and create if statement */
  3. $videotype = get_post_meta($post->ID, 'Video Type', single);
  4. $videoid = get_post_meta($post->ID, 'Video ID', single);
  5. $selected_id = get_the_ID();
  6. if ($videotype == 'vimeo') {   
  7.         echo '<iframe src="http://player.vimeo.com/video/'.$videoid.'" width="980" height="551" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
  8. }
  9. else if ($videotype == 'youtube') {
  10.         echo '<iframe width="980" height="551" src="http://www.youtube.com/embed/'.$videoid.'?hd=1&amp;rel=0&amp;autohide=1&amp;showinfo=0&amp;autoplay=1" frameborder="0" allowfullscreen></iframe>';
  11. }
  12. else {
  13.         echo 'Please Select a Video type.';
  14. }
  15. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top