New Landing How can we help? Themeforest Theme Support Dante Remove youtube video URL title on video post thumbnail

Viewing 8 posts - 1 through 8 (of 8 total)
  • Posted in: Dante
  • #110533
    mhote
    Member
    Post count: 394

    Is there a way to remove the youtube video title in the attached? The normal html extensions don’t seem to work when inserted into the post heading section.

    Attachments:
    You must be logged in to view attached files.
    #110618
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please open to edit media.php at /flexform/includes/page-builder/composer/lib/shortcodes/ through FTP software.

    Find this code:-
    $embed = $wp_embed->run_shortcode('[embed width="'.$video_w.'"'.$video_h.']'.$link.'[/embed]');
    Replace with
    $embed = $wp_embed->run_shortcode('[embed width="'.$video_w.'"'.$video_h.']'.$link.'[/embed]');
    $embed  = str_replace('&rel=0','&rel=0&showinfo=0',$embed);
    

    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

    #110629
    mhote
    Member
    Post count: 394

    Thanks Mohammad? Is that file path correct for Dante?

    #110635
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Sorry! Please find file at /dante/swift-framework/page-builder/builder/shortcodes/.
    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

    #110639
    mhote
    Member
    Post count: 394

    Great thanks Mohammad. I meant to ask about the Blog archive page also – do you know which file or is there a way to find out the file through firefox or another tool?

    #110656
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please insert given below code at functions.php of child theme.

    function sf_video_youtube($url, $width = 640, $height = 480) {
    			preg_match('/[\\?\\&]v=([^\\?\\&]+)/', $url, $video_id);
    			return '<div class="sf-video-wrap"><iframe itemprop="video" src="http://www.youtube.com/embed/'. $video_id[1] .'?wmode=transparent&showinfo=0&rel=0" width="'. $width .'" height="'. $height .'" ></iframe></div>';
    		}
    
    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&showinfo=0&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';
    				}
    			}
    		}

    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

    #110667
    mhote
    Member
    Post count: 394

    You’re a champion.

    #110683
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome. I’m glad that issue resolved.
    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

Viewing 8 posts - 1 through 8 (of 8 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