Place this code into your themes single.php.
Requires my embed function and meta-boxes!
Place this code where you would like your Automatic Youtube Video to appear.
This code will check the post meta data for an Automatic Youtube Video, if no video is found it will disable the iFrame and hide it.
<?php $disable = of_get_option( 'disable_features' ); $video_url = get_post_meta($post->ID,'_tern_wp_youtube_video',true); $embeded_code = get_post_meta($post->ID,'_tern_wp_youtube_video',true); ?><?php if($video_url !='' || $embeded_code != '') { ?><?php tern_wp_youtube_video(); ?><?php } ?>
To disable Automatic Youtube Video iFrame in content area:
Change line 30 of /core/video.php from:
add_filter(‘the_content’,’WP_ayvpp_content’);
to:
//add_filter(‘the_content’,’WP_ayvpp_content’);
Please let me know if you have any problems adding the embed function to any of your WordPress themes? Please reply here and also on https://www.codecentral.org/embed so to help any others trying to achieve this!