New Landing How can we help? Themeforest Theme Support Dante Stop YouTube Related Videos on Video Portfolio

Viewing 15 posts - 1 through 15 (of 17 total)
  • Posted in: Dante
  • #117221
    shannond
    Member
    Post count: 5

    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!

    #117364
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please try out this plugin https://wordpress.org/plugins/hide-youtube-related-videos/ and let me know your feedback.
    Thanks
    Mohammad

    #126284
    VdEW
    Member
    Post count: 73

    Hi 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..

    #126380
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,

    @VdEW
    – Please provide me specific page url and wordpress admin login detail so i can inspect the issue.
    Thanks
    Mohammad

    #126921
    VdEW
    Member
    Post count: 73
    This reply has been marked as private.
    #126951
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    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
    Mohammad

    #130304
    STONZ
    Member
    Post count: 15

    Hi 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,
    Stoker

    #130306
    STONZ
    Member
    Post count: 15

    Hi 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,
    Stoker

    EDIT: Is it also possible to use the embed function within the full screen video ? What is the code for this.

    #130341
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    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
    Mohammad

    #130346
    STONZ
    Member
    Post count: 15

    Hi 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&#8243; extraclass=””]

    however it is still not working?

    Is this the right shortcode?

    Thanks,
    Stoker

    #130348
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    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
    Mohammad

    #130353
    STONZ
    Member
    Post count: 15

    Has 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

    #130357
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please remove the code through FTP software now. Please provide me wesbite url and wordpress admin login detail after installing WPIDE plugin.
    Thanks
    Mohammad

    #130370
    STONZ
    Member
    Post count: 15
    This reply has been marked as private.
    #130372
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Yes, Of course.
    Thanks
    Mohammad

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register