Theme Functions

You may want to customize your  theme to better display your video posts in lists and on single pages. This plugin has a number of functions built-in that might help you along the way.

Here is a list of function you can use in post lists and in post templates:


The Video Function

You may want to display videos in a specific location. To display a video use the following code:

<?php
$video = new vimeo_video();
echo $video->video();
?>

This code will display a video for whatever post is active.


The Video URL Function

You may want to get the URL of the video for the active post.

<?php
$video = new vimeo_video();
echo $video->video_url();
?>


The Video Watch URL Function

If you’d like to print the video’s watch URL use the following:

<?php
$video = new vimeo_video();
echo $video->video_watch_url();
?>


The Video Thumbnail Function

If you want to get the URL for the active post’s Vimeo® video’s thumbnail you can use the following function.

<?php
$video = new vimeo_video();
$thumbnail = $video->thumb('small');
?>

There are a number of sizes you can retrieve using this function. They are as follow:

  • thumb
  • small
  • medium
  • large
  • xlarge
  • max

The Video Vimeo® Author URL Function

If you’d like to print the video’s author’s URL use the following:

<?php
$video = new vimeo_video();
echo $video->author_url();
?>