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 want to make a TV Show database in Wordpress that has this URL format:

  • /tvshows/ would list all series
  • /tvshows/friends/ would list all the seasons available for Friends TV Show
  • /tvshows/friends/01/ would list all episodes of Friends from season 1
  • /tvshows/friends/01/12/ would show information on the 12th episode of the first season

And here are the different methods I've thought about:

1) The first idea that came to my mind is to create Pages and nest them accordingly. Then create 3 different page templates (TVShow.php, Season.php and Episode.php) and style each page accordingly. The main drawback is that once there are 200 series with 4 seasons and 25 episodes each (total of 20,000 pages) it can be a complete mess to update and find everything. (Another drawback is the RSS feed although this can be solved through plugins)

TV SHows - Page-based

2) Some colleagues suggest me to use Custom Posts but these do not have a hierarchical structure and although I could then use mod_rewrite to make the URLs nice I guess it would be even more hassle than using Pages. (There's this plugin that manages custom posts through a UI although I cannot figure out how to create a hierarchical organization)

3) The last idea is to have them as normal Posts and then Categorize them by Serie name, season and episode hence avoiding all the custom post hassle and using simple Wordpress API functions to list and display everything.

Those are the best/possible ways I can think of, the Page-based option may be the most suitable although scalable in a painful way once there are +500 pages.

Any ideas, suggestions on how to organize this?

Thanks in advance! :)

share|improve this question
re 2) Custom Post Types can have a hierarchical structure: 'hierarchical' => true (codex.wordpress.org/Function_Reference/register_post_type) – Piet Jun 16 '11 at 2:09
similar question here, might give you ideas: wordpress.stackexchange.com/questions/2839/… – joelhaus Jun 16 '11 at 8:59
up vote 2 down vote accepted

First, you shouldn't do this with the built in post types of post or page. Use a custom post type.

Example: movies and series, where movies is non-hierarchical, but series is.

Use register_post_type() and set hierarchical to true (default: false). Take a look at the rewrite argument > with_front to prepend /series/.

Then add some templates:

  • series-list.php,
  • series-detail.php,
  • series-season.php,
  • series-episode.php...
share|improve this answer

Justin Tadlock created a movie database using custom taxonomies that achieves something similar and he describes it in a tutorial here

share|improve this answer
Thank you Carson, I'll need a hierarchical structure which is not used in the tutorial although it gives a great overview and I may use it in a future if we ever decide to add movies too – XaviEsteve Jun 17 '11 at 10:20

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.