css tricks videos
# April 7, 2009 at 8:39 pm
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?
J# April 8, 2009 at 1:23 pm
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:
http://blip.tv/# April 15, 2009 at 7:24 pm
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.
Thanks again.# April 16, 2009 at 12:05 am
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.# April 18, 2009 at 9:45 pm
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.# April 19, 2009 at 4:51 pm
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.# May 7, 2009 at 6:52 pm
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.