Embeded Videos- No longer functions
Hi There,
I was using the following code in the theme functions file in my last theme which allowed me to embed videos with something like this: [responsive-video identifier=gn7Jp1e41p4]
However it doesnt seem to work with your child theme. Would there be any reason as to why it wont work?
}
// Register the Responsive Video shortcode to wrap html around the content
function responsive_video_shortcode( $atts ) {
extract( shortcode_atts( array (
'identifier' => ''
), $atts ) );
return '<div class="video-container"><iframe src="//www.youtube.com/embed/' . $identifier . '?showinfo=0&rel=0&autoplay=0" frameborder="0" allowfullscreen></iframe></div><!--video-container-->';
}
add_shortcode ('responsive-video', 'responsive_video_shortcode');
// Register the Responsive Video shortcode to wrap html around the content
function responsive_vimeo_shortcode( $atts ) {
extract( shortcode_atts( array (
'identifier' => ''
), $atts ) );
return '<div class="video-container"><iframe src="//player.vimeo.com/video/' . $identifier . '?autoplay=0" frameborder="0" allowfullscreen></iframe></div><!--video-container-->';
}
add_shortcode ('responsive-vimeo', 'responsive_vimeo_shortcode');
- - - Updated - - -
Also in my last theme I used the following in the style sheets
Style Sheet(child theme)
/* responsive video */
.video-container { position: relative; padding-bottom: 56.25%; margin: 15px 0 30px 0; height: 0; overflow: hidden; }
.video-container iframe { position: absolute; top:0; left: 0; width: 100%; height: 100%; }
li#cp_youtube_video, li#cp_vimeo_video { display: none; }
Thanking you in advance
Michael