Title: Function to add Vimeo Shortcode
Last modified: August 19, 2016

---

# Function to add Vimeo Shortcode

 *  [equaldesign](https://wordpress.org/support/users/equaldesign/)
 * (@equaldesign)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/function-to-add-vimeo-shortcode/)
 * I am displaying videos from [Vimeo](http://www.vimeo.com/penny4them) on my website
   and in order to make this easier than embedding the code all the time I have 
   created code in the template files that uses a custom field instead. It uses 
   an if statement to check that the custom field is present and then if it is it
   displays the flash embed code for the vimeo video ID entered as a custom field.
 * However this only places in where I placed the code in the template file. I want
   to be able to create a function to go in functions.php where I can then check
   whether the custom field is present and then if it is, I can then use a short
   code in my post (something like [vimeo=2322] which will then display the video
   in that place (in the example it would display the vimeo video with the ID of
   2322).
 * I just wondered if anyone knew of anything that was already done or how I could
   go about doing this myself.
 * Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [equaldesign](https://wordpress.org/support/users/equaldesign/)
 * (@equaldesign)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/function-to-add-vimeo-shortcode/#post-963685)
 * I have found a vimeo plugin in the plugins directory but it is still a little
   more complicated than I was hoping for. Any ideas anyone?
 *  [spy-man](https://wordpress.org/support/users/spy-man/)
 * (@spy-man)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/function-to-add-vimeo-shortcode/#post-963852)
 * wooow cool man
    [blog](http://www.3rbloadiz.co.cc)
 *  [siffring](https://wordpress.org/support/users/siffring/)
 * (@siffring)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/function-to-add-vimeo-shortcode/#post-963936)
 * Here’s [a simple plugin](http://siarto.com/2008/10/02/vimeo-wp-plugin/) that 
   I think does exactly what you want.
 *  [mikey1](https://wordpress.org/support/users/mikey1/)
 * (@mikey1)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/function-to-add-vimeo-shortcode/#post-963937)
 * Hi, this plugin is very useful for vimeo and many other formats.
    [http://wordpress.org/extend/plugins/vipers-video-quicktags/](http://wordpress.org/extend/plugins/vipers-video-quicktags/)
   good luck. mike.
 *  [pwyll](https://wordpress.org/support/users/pwyll/)
 * (@pwyll)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/function-to-add-vimeo-shortcode/#post-963954)
 * equaldesign – any chance you could share the code for modifying the template 
   file to add vimeo thru custom field?
 * Thanks
 *  [pwyll](https://wordpress.org/support/users/pwyll/)
 * (@pwyll)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/function-to-add-vimeo-shortcode/#post-963955)
 * or…is there a simple way for to specify the vimeo ID and height/width in a single
   custom field?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Function to add Vimeo Shortcode’ is closed to new replies.

## Tags

 * [functions](https://wordpress.org/support/topic-tag/functions/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)
 * [video](https://wordpress.org/support/topic-tag/video/)
 * [vimeo](https://wordpress.org/support/topic-tag/vimeo/)

 * 6 replies
 * 5 participants
 * Last reply from: [pwyll](https://wordpress.org/support/users/pwyll/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/function-to-add-vimeo-shortcode/#post-963955)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
