Created
May 11, 2013 03:39
-
-
Save JiveDig/5558808 to your computer and use it in GitHub Desktop.
Embed a video using Advanced Custom Fields and url in text 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
/** Embeda video from url */ | |
add_action( 'genesis_post_content', 'executive_do_video_single' ); | |
function executive_do_video_single() { | |
$value = get_field( "video_url" ); | |
if( $value ) { | |
echo '<p>'; | |
echo wp_oembed_get ( $value ); | |
echo '</p>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment