Hi,
Please paste given below code at functions.php of child theme.
function sf_get_embed_src( $url ) {
if ( strpos( $url, 'youtube' ) ) {
preg_match( '/[\\?\\&]v=([^\\?\\&]+)/', $url, $video_id );
$youtube_params = apply_filters( 'sf_youtube_embed_src_params', '?autoplay=1&rel=0' );
if ( is_ssl() ) {
if ( isset( $video_id[1] ) ) {
return 'https://www.youtube.com/embed/' . $video_id[1] . $youtube_params;
}
} else {
if ( isset( $video_id[1] ) ) {
return 'http://www.youtube.com/embed/' . $video_id[1] . $youtube_params;
}
}
} else {
$url = str_replace( 'https://', 'http://', $url );
$video_id = sf_get_vimeoid( $url );
$vimeo_params = apply_filters( 'sf_vimeo_embed_src_params', '?title=0&byline=0&portrait=0&autoplay=1&rel=0' );
if ( is_ssl() ) {
if ( $video_id != "" ) {
return 'https://player.vimeo.com/video/' . $video_id . $vimeo_params;
}
} else {
if ( $video_id != "" ) {
return 'http://player.vimeo.com/video/' . $video_id . $vimeo_params;
}
}
}
}
Thanks
Mohammad