How add class youtube and type/html to oembed code?

How can i add : class=”youtube-player” type=”text/html” to iframe like : function Oembed_youtube_no_title($html,$url,$args){ $url_string = parse_url($url, PHP_URL_QUERY); parse_str($url_string, $id); if (isset($id[‘v’])) { return ‘<iframe class=”youtube-player” type=”text/html” src=”https://www.youtube.com/embed/’ .$id[‘v’].’?vq=large&autohide=1&autoplay=1&fs=1&hl=fr&rel=0&loop=1″ frameborder=”0″ allowfullscreen></iframe>’; } return $html; } 2 s 2 You can try this: add_filter( ’embed_oembed_html’, ‘custom_youtube_oembed’ ); function custom_youtube_oembed( $code ){ if( stripos( $code, ‘youtube.com’ ) !== … Read more

Do_Shortcode not working for Embed

I’m trying to use Custom Field types to embed Youtube videos in a more organized fashion and using the Do_Shortcode() would seem to work perfectly, however this: <?php echo do_shortcode(”); ?> Does not seem to work, however in the same single.php file this does work perfectly: <?php echo do_shortcode(”); ?> I put them one after … Read more