Helper::embed_by_video_id( string $video_id, array $args = array(), bool $echo = true )

Create the embed code based on given parameters



(Required) The Vimeo video ID.


(Optional) An array of arguments used when embedding.

Default value: array()


(Optional) Output the embed code (true) or not (false).

Default value: true




File: includes/libs/helper.class.php

	public static function embed_by_video_id( $video_id, $args = [], $echo = true ){
		$default = [
			'title' => 1,
			'byline' => 1,
			'portrait' => 1,
			'dnt' => 1

		$args = wp_parse_args(

		$embed = sprintf(
			'<iframe src="%s" width="100%%" height="100%%" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>',
				urlencode( $video_id ),
				http_build_query( $args )

		if( $echo ){
			echo $embed;

		return $embed;

Start your video site now!

Manage and coordinate your Vimeo channels, albums or videos with your WordPress website. Perfect fit for membership, portfolio, online courses or any type of video collection.

Get Vimeotheque PRO!