Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Stop YouTube Related Videos on Video Portfolio
New Landing › How can we help? › Themeforest Theme Support › Dante › Stop YouTube Related Videos on Video Portfolio
- This topic has 16 replies, 4 voices, and was last updated 10 years by Mohammad – SUPPORT.
-
Posted in: Dante
-
October 3, 2014 at 11:25 pm #117221
I have created a portfolio grid page that shows all images of video screenshot thumbs. When you click on one, it launches the full screen video viewer and plays a YouTube video.
I do not want the related videos to show after the main video has played.
On each items’ individual portfolio page, the only thing populated is the Page Meta for thumbnail options. I added “?rel=0” to the end of the URL but it had no effect.
Please advise. Thanks!
October 6, 2014 at 5:37 am #117364Hi,
Please try out this plugin https://wordpress.org/plugins/hide-youtube-related-videos/ and let me know your feedback.
Thanks
MohammadNovember 6, 2014 at 6:31 pm #126284Hi Mohammad,
i have tried this plugin to hide YouTube related videos after the video is finished but it seems not working. Maybe just in my case..
November 7, 2014 at 8:52 am #126380Hi,
@VdEW – Please provide me specific page url and wordpress admin login detail so i can inspect the issue.
Thanks
MohammadNovember 10, 2014 at 11:40 am #126921This reply has been marked as private.November 10, 2014 at 12:39 pm #126951Hi,
I used given below code at functions.php to resolve the issue.function sf_video_youtube($url, $width = 640, $height = 480) { preg_match('/[\\?\\&]v=([^\\?\\&]+)/', $url, $video_id); $youtube_params = apply_filters('sf_youtube_embed_params', '?wmode=transparent&rel=0'); $video_padding = (intval($height, 10) / intval($width, 10)) * 100; $inline_style = 'padding-bottom: '.$video_padding.'%;'; if (is_ssl()) { return '<div class="sf-video-wrap" style="'.$inline_style.'"><iframe itemprop="video" class="video-embed" src="https://www.youtube.com/embed/'. $video_id[1] . $youtube_params .'" width="'. $width .'" height="'. $height .'" ></iframe></div>'; } else { return '<div class="sf-video-wrap" style="'.$inline_style.'"><iframe itemprop="video" class="video-embed" src="http://www.youtube.com/embed/'. $video_id[1] . $youtube_params .'" width="'. $width .'" height="'. $height .'" ></iframe></div>'; } }
Thanks
MohammadNovember 23, 2014 at 10:02 pm #130304Hi Mohammad,
Was this resolved? As i am having the same issue. I used the full page video shortcode, with rel=0 but i am still confronted with related videos at the end. How do i use the short code and make use of your .php above.
Thanks,
StokerNovember 23, 2014 at 10:15 pm #130306Hi Mohammad – SUPPORT,
Was this resolved? As i am having the same issue. I used the full page video shortcode, with rel=0 but i am still confronted with related videos at the end. How do i use the short code and make use of your .php above.
Thanks,
StokerEDIT: Is it also possible to use the embed function within the full screen video ? What is the code for this.
November 24, 2014 at 3:37 am #130341Hi,
It has been resolved. Please follow my last reply with code. You need to paste that code at functions.php of child theme. Hopefully that should resolve the issue.
Thanks
MohammadNovember 24, 2014 at 3:49 am #130346Hi thanks,
I have pasted the above code into functions.php and use short code like this[sf_fullscreenvideo type=”icon-button” btntext=”” imageurl=”” videourl=”https://www.youtube.com/watch?v=W7HjiGFU0uA?rel=0″ extraclass=””]
however it is still not working?
Is this the right shortcode?
Thanks,
StokerNovember 24, 2014 at 3:54 am #130348Hi,
Please paste also this code at functions.php of child theme.function sf_get_embed_src($url) { if (strpos($url,'youtube')){ preg_match('/[\\?\\&]v=([^\\?\\&]+)/', $url, $video_id); if (isset($video_id[1])) { return 'http://www.youtube.com/embed/'. $video_id[1] .'?autoplay=1&wmode=transparent&rel=0'; } } else { preg_match('/http:\/\/vimeo.com\/(\d+)$/', $url, $video_id); if (isset($video_id[1])) { return 'http://player.vimeo.com/video/'. $video_id[1] .'?title=0&byline=0&portrait=0&autoplay=1&wmode=transparent&rel=0'; } } }
Thanks
MohammadNovember 24, 2014 at 4:01 am #130353Has now corrupted website with this error
Parse error: syntax error, unexpected ‘[‘ in /home/talents1/public_html/wp-content/themes/dante/functions.php on line 336
November 24, 2014 at 4:04 am #130357Hi,
Please remove the code through FTP software now. Please provide me wesbite url and wordpress admin login detail after installing WPIDE plugin.
Thanks
MohammadNovember 24, 2014 at 4:24 am #130370This reply has been marked as private.November 24, 2014 at 4:28 am #130372Hi,
Yes, Of course.
Thanks
Mohammad -
Posted in: Dante
You must be logged in and have valid license to reply to this topic.