0

Hi and thanks in advance for reading this long question.

I'm about halfway through building a site for a NYT bestselling author, and have hit a point where I realize I may not have organized myself in the best way in terms of data management. Before I go back and rebuild, I figured I should ask the experts their opinions.

My stumbling block is how do I code the main Books archive page. I'd like it organized like this:

Genre (organized in specific order, can be hard-coded)

-- Series (organized by which series contains the most recently published book OR by custom post order set by admin - either is acceptable)

--- Books (organized by custom field "Book in Series")

-- Series

--- Books

Genre

-- Series

--- Books

... etc.

I would also like each Genre and Series to have its own archive page. For the Genre archive it should again be organized by Series and then books within each series.

Here's what I'm set up now:

Books (Custom Post Type)

  • Original Publication Date (custom field)
  • ISBN (custom field)
  • Featured Characters (custom taxonomy)
  • Secondary Characters (custom taxonomy)
  • Series name (custom taxonomy)
  • Book in Series (#) (custom field)
  • Synopsis (custom field)
  • Additional freeform content (default content of post type Books)

Book Excerpts (Custom Post Type)

  • sets Parent ID for related book via dropdown list of books / custom field

Book Praise (Custom Post Type)

  • sets Parent ID for related book via dropdown list of books / custom field

My concerns

  1. What is the best way to code the Books archive page? Would it more efficient/easier to code if I made Series and Genre custom post types with parent/child relationships between themselves and the books, instead of custom taxonomies? EDIT: I ask because when I went to code this page I realized I would need to do multiple nested loops (I think, though maybe I could use something like the solution suggested here?).
  2. Should I make Book Excerpts and Book Praise custom fields instead of separate custom post types? I need the content for each to display on a separate page from the single Book page to which it is attached, as it can be quite long.
  3. Is there anything else I'm doing in a needlessly complicated way?

If it makes any difference, I have been using the Verve Meta Boxes and Custom Post UI plugins to create my various custom post types / taxonomies / custom fields.

Thank you again for taking the time to read this and also for any advice you can throw my way! :-)

2

1 Answer 1

1

Well this is a bit difficult to get my head around but some advice:

Map out your relationships visually and spent time on it, getting things right at the start is crucial to avoid major problems down the road. Some tools you can use are Visio (Microsoft) or Gliffy, I'm sure there are plenty of others.

Secondly I think if you should be using Taxonomies for the majority of these relationships.

I don't know what book excerpts or praise is but if it is data tied to one specific book then it should be a custom meta field. You can have unlimited fields for the same meta keys.

I would consider not using any third party plugins for custom fields or taxonomies, create your own plugin to register them, there is now even on online CPT generator you can use and just copy/paste.

I also recommend checking out this post, even though it is dated, it might give you a good idea on how to arrange taxonomies, http://justintadlock.com/archives/2009/06/04/using-custom-taxonomies-to-create-a-movie-database

3
  • Thanks so much for your advice Wyck. A question, if I used custom meta fields for the Excerpts and Praise, how would I then display them on their own pages? I didn't realized that was possible. Also, is the reason you're suggesting taxonomies for most of the relationships because terms are cached, or is there another reason? From a pure logic standpoint I've been thinking I should use taxonomies for items that may need to be grouped together (all the books in which a Featured Character appears, all the Historical Romances etc). Thanks again!
    – Michelle
    Commented Sep 11, 2011 at 18:39
  • Well meta fields are very dynamic, even though they are 'tied' to a post that doesn't mean much since you can use WP Query to grab that data and do whatever you want with it, for instance display it on one page, or display only a certain amount/date on a separate page, etc. codex.wordpress.org/Class_Reference/… . Taxonomies simply allow you do have a hierarchical (or if you want non hierarchical) relationship, from an organizing stand-point they make life easier, it's like a super advanced filing cabinet.
    – Wyck
    Commented Sep 12, 2011 at 18:31
  • Thanks again! For anyone down the line who cares, this is where I ended up: wordpress.stackexchange.com/questions/28302/…
    – Michelle
    Commented Sep 13, 2011 at 15:54

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.