Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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! :-)

share|improve this question
    
Making some strides thanks to Otto's excellent post here: ottopress.com/2011/when-to-not-use-a-custom-taxonomy - will post conclusions when I'm more confident. I'm learning a lot about when to use taxonomies that's for sure! –  Michelle Sep 12 '11 at 14:56
    
I'm going to vote to close this question as I've asked a new one with the current state of affairs here: wordpress.stackexchange.com/questions/28302/… –  Michelle Sep 12 '11 at 16:52
add comment

1 Answer

up vote 1 down vote accepted

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

share|improve this answer
    
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 Sep 11 '11 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 Sep 12 '11 at 18:31
    
Thanks again! For anyone down the line who cares, this is where I ended up: wordpress.stackexchange.com/questions/28302/… –  Michelle Sep 13 '11 at 15:54
add comment

Your Answer

 
discard

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.