2

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?

Thanks,

Tim

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

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


FRONT PAGE VIDEO FEATURE

Vimeo URL: [____________________________]

[Save] [Cancel]


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

2
  • what do you mean by "limits the field size? "
    – Bainternet
    Commented Jun 1, 2011 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
    Commented Jun 6, 2011 at 18:59

2 Answers 2

2

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

[embed]http://vimeo.com/24474320[/embed]

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.

3
  • 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
    Commented Jun 6, 2011 at 19:00
  • added crude visual (see above)
    – timshutes
    Commented Jun 6, 2011 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
    Commented Jun 7, 2011 at 16:31
1

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.

3
  • 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
    Commented Jun 6, 2011 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
    Commented Jun 7, 2011 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
    Commented Jun 21, 2011 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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