-
Author
-
February 25, 2015 at 05:33 #47541gigidesignParticipant
How do you embed a youtube video in a post or page without the related videos after it finishes playing? The &rel=0 or ?rel=0 doesn’t work.
February 25, 2015 at 16:26 #47584sharmstrModeratorI found this out yesterday when trying to force the resolution using the VQ=HD1080 parameters. The shortcode takes the link you supply and turns into an iframe tag. To do this, it only looks at part of the link and ignore the rest. I haven’t had a chance to talk to abe about this yet. I’ll assign this to him so he can see it.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
March 3, 2015 at 23:11 #48635AbeKeymasterHi, we have a function that adds other parameters to youtube oembeds and you could change that to include the rel=0
You will need to copy the function to your kleo_child/functions.php file to override our defined one.
Here is the modified function to use and see how it goesCOPY CODEfunction kleo_add_video_wmode_transparent($html, $url, $attr) { if (strpos($html, "youtube.com") !== NULL || strpos($html, "youtu.be") !== NULL) { $info = "&showinfo=0&rel=0"; } else { $info = ""; } if ( strpos( $html, "<embed src=" ) !== false ) { return str_replace('</param><embed', '</param><param name="wmode" value="opaque"></param><embed wmode="opaque" ', $html); } elseif ( strpos ( $html, 'feature=oembed' ) !== false ) { return str_replace( 'feature=oembed', 'feature=oembed&wmode=opaque'.$info, $html ); } else { return $html; } }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.