Last active
May 2, 2016 01:05
-
-
Save erezLieberman/9228890 to your computer and use it in GitHub Desktop.
youtube player from acf field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (get_field('youtubeURL')) { | |
$mystring = get_field('youtubeURL'); | |
$parts = explode("=",$mystring); | |
$mystring = $parts['1']; ?> | |
<iframe width="440" height="228" src="//www.youtube-nocookie.com/embed/<?php echo $mystring ; ?>" frameborder="0" allowfullscreen></iframe> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://stackoverflow.com/a/18655487/2721050
to fix firefox issue when its bootstrap modal in firefox