I am doing a martial arts site that is going to have a lot of videos as well as articles. I’m interested in how the videos are set up on css tricks. I am using wordpress as well. I’d like to let wordpress manage as much of it as possible.
Are you posting the videos using wordpress or are you using a static page. I notice you are posting the videos on the blog and then you also have the videos page as well, and that is how I’d like to have the site I’m working on. Is the information on the videos page being pulled out dynamically?
Could you give me your process for adding a new video?
I do use WordPress to post the videos. The videos are embedded into a special page template using a WordPress custom field. I use SWFObject and the JW FLV media player:
I also recommend checking out Blip.tv to host your videos. They have great quality and a great player:
Thanks for the suggestions Chris.
I did some reading on custom fields and page templates. What I gather is that you’d have two page templates. One that lists all the videos and a second that you view the videos on. I’d have custom fields set up for video description, video image and embed code. Would I need to use categories to categorize them as videos or is pulling the unique custom field information enough to select the video posts?
I also checked out blip.tv and may end up using that player.
Does this sound like I’m on the right track? If this will work, I’d like to get started messing around with it this weekend.
You can’t really "categorize" pages, you just give them your special template that is just for videos.
Personally, my "parent" video page is manually edited by me, but you could be smarter as use yet another page template that pull child pages of it and dynamically builds itself. Look into the wp_list_pages function and passing it child_of paramaters.
Sounds like you are on the right track to me.
Ok. I’ve been doing some reading and I think you may have lost me a bit with displaying child pages in the parent page. I’m still trying to get my head around how everything fits together in wordpress. My original thought was that I’d be pulling the custom field information from "posts" into the parent page, which would link to a single.php type page that would have the video player.
Are you saying that I’d create a parent template page, and then to add a video I’d create a new "page" instead of a "post"? The new page would be a subpage of the parent and would have the video embeded on it. I would also add the custom field information to the "subpage". And then pull the info on the child page into the parent page?
Is there an advantage to doing it with pages over posts?
Thanks again for all the advice and patience. I’ve been working with websites for a few years now, but it’s my first dive into a site using wordpress. I’m hoping that learning it will make future sites easier to maintain.
Yeah sounds like you understand…
I use pages because with pages, I can specify a special template to use, where that is not possible with posts. Also, pages have that parent/child relationship that posts do not.
This is exactly what I do on CSS-Tricks. The videos page is just a regular page, same template I use for everything else. Each video page is a child page of the videos page, and set to use a special template. That template has custom fields with information for the video.
I just have couple wrap up questions. I’ve got everything working the way Chris suggested.
Is there a wordpress function or an easy way to get the videos parent page to paginate the child videos its pulling in? Say I’d only want 10 per page.
Also, would using a custom field be the best way to categorize them so that I could have ways to filter the videos?
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".