TV Show database – Best way for structuring it?

I want to make a TV Show database in WordPress that has this URL format:

/tvshows/friends/01/12/
  • /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:

Read More

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! 🙂

Related posts

Leave a Reply

2 comments

  1. 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…