WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to create a front page video feature that embeds a vimeo video of the users choosing. I'd like the user to only have to input the video code. For instance, for http://vimeo.com/24474320 - I'd like them only to have to input "24474320".

Should I use custom post types for this? If so, how do I set this up so that it limits the field size? I'm just getting started, and I'm relatively new at wordpress, so I don't need to get into specific code necessarily - it's more of a strategic question. How would you tackle this?



-----------------------EDIT (Monday, June 6)

It would be awesome if all the user (backend) saw was this:


Vimeo URL: [____________________________]

[Save] [Cancel]

Then I would call that video into the front page feature.

share|improve this question
what do you mean by "limits the field size? " – Bainternet Jun 1 '11 at 16:17
For instance - if I use the supports => editor I'll get a full editor for what really just needs to be a URL input. That's all I mean by "limits the field size" - I'd like it to be a single input line for a URL, so if I used a custom post type, I probably wouldn't want to use the full editor unless I could limit it. – timshutes Jun 6 '11 at 18:59
up vote 2 down vote accepted

With oEmbed support in both WordPress and on Vimeo's end, why not just use the [embed] shortcode?


This is easy to explain, and users are generally pretty comfortable with just copy-and-pasting a URL directly, rather than having to extract just the ID out of it.

You can also turn on the option to just use the URL on a line by itself in a post, without the [embed] shortcode. Personally, I prefer the explicit shortcode, because it always works, and there's less chance of other plugins interfering.

share|improve this answer
I like the idea of the [embed] short code. I'd like to create this feature though with as few points of failure as possible. It would be great if the end user saw just an input box that said "Vimeo URL" – timshutes Jun 6 '11 at 19:00
added crude visual (see above) – timshutes Jun 6 '11 at 19:14
I'm marking this as the answer because it was the most helpful. I might repost at some point looking for some more advice on how to actually pull this off.. but the embed tag will be a really nice help. Thanks those of you who weighed in... – timshutes Jun 7 '11 at 16:31

You could set up a custom post type, and simply not register the editable content area.

A better solution might be to look into the new Post Formats feature within WP. It explicitly has a post format of "video" that you might look into.

share|improve this answer
I like the new post formats, but isn't the purpose of those to enable custom formatting ala Tumblr within a feed? So, for instance, video posts within the feed would appear and be formatted differently than image posts, quotes, etc? The feature I'm talking about would be a single video on the front page that would be separate from the feed. – timshutes Jun 6 '11 at 19:04
The post formats can be queried, so you could create a custom loop just for these. I haven't used them much myself, so I don't know exactly the best way to implement them. – Dan Gayle Jun 7 '11 at 1:35
good point - I think that might be a little more complicated than what I'm looking for. I'll bump your post up though for suggesting the custom query idea. – timshutes Jun 21 '11 at 14:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.