New Landing How can we help? Themeforest Theme Support Dante Add parameter to Vimeo Embed (?title=0&byline=0&portrait=0)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Dante
  • #156134
    gravitymarketing
    Member
    Post count: 2

    Hello,

    I would like to add parameters to a Vimeo embed (?title=0&byline=0&portrait=0).

    I’ve found some previous posts you made on youtube embed edits. It seems like you encouraged the user to use a find and replace in the pagebuilder/media class and using a regex on youtube’s rel=0 you can add additional tags.

    However, I’m having some issues with vimeo because there doesnt appear to be anything to replace it with, ie, there is no rel=0 on the end, or anything on the end. Additionally, I see it generating an iframe not an embed, which makes trying to work out what i should do hard. When I’ve tried just straight appending the string to the embed URL, WP seems to strip these paramters from the embed. So I’m asking for help now.

    Anyway, is there anyway to remove the title/byline and avatar from Vimeo using the querystring parameters I mentioned? Appreciate the help.

    Kind Regards

    Jeremy

    #156146
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme.

    function sf_video_vimeo($url, $width = 640, $height = 480) {
    			preg_match('/http:\/\/vimeo.com\/(\d+)$/', $url, $video_id);	
    			if ( is_ssl() ) {
    				return '<div class="sf-video-wrap"><iframe itemprop="video" src="https://player.vimeo.com/video/'. $video_id[1] .'?title=0&byline=0&portrait=0?wmode=transparent&title=0&byline=0&portrait=0" width="'. $width .'" height="'. $height .'"></iframe></div>';
    			} else {	
    				return '<div class="sf-video-wrap"><iframe itemprop="video" src="http://player.vimeo.com/video/'. $video_id[1] .'?title=0&byline=0&portrait=0?wmode=transparent&title=0&byline=0&portrait=0" width="'. $width .'" height="'. $height .'"></iframe></div>';
    			}
    		}

    Thanks
    Mohammad

    Thanks
    Mohammad

    #156165
    gravitymarketing
    Member
    Post count: 2

    Thanks mate, champion.

    Appreciate the help.

    #156167
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome. I’m glad that issue resolved.
    Thanks 🙂
    With Best Regards
    Mohammad

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