Here is a rough wireframe mockup of a classical music website I am putting together.
From this page you can get a good idea of my menu structure. I was wondering if anyone could advise how to approach this structure. So far I have everything as pages - bio, reviews, news etc are all child pages of an artist (in this example Joe Bloggs), and each artist is a child of the top level section (in this example instrumentalists).
But the only problems with this is that I have to create lots of pages called ‘bio’, and lots of pages called ‘news’ (for each artist) which starts to get very confusing! This will be a mess to maintain and there is a lot of repetition.
Based on info you have given, I’d suggest that you create these custom post types (non hierarchical) - artist, bio, reviews & news. The posts of “artist” type would serve as the parent for “bio”, “reviews”, “news” etc. And as suggested by Justin Tadlock, you would need to add a metabox on each of the child post type add/edit screens in admin which would allow you to choose a post of “artist” type that you can assign as parent.
Now the approach of using dropdown in a metabox to select artist is ok as long as you have less than 100 (I’d say 50 but you can extend to 100 by implementing caching and without going overboard on performance hit) artists. But if artists are going to be more then you’d be better off by implementing an auto-complete search box instead of a dropdown of all artists. That way you can add a few alphabets and search for an artist for which you’re writing bio/review/news etc. without the performance concern that would become a headache if you try to put 500 or 1000 artists in a dropdown.
If your reviews are just going to have a bunch of paragraphs & you don’t need more than the reviewer’s name, email & URL then you can get away by not creating a post for every review. Instead you can create one post of type “review” for every artist and store all reviews as comments of that post. That way there will be only one review post in DB for every artist post.
You can do the same with news for artists as well.
All making sense apart from the following (I’m easily confused)
I get that using the comments could potentially work in that way. I will have to ask though, as I think they may want to put images with reviews sometimes. But if not, and comments can be used - when you say ‘create one post of type “review” for every artist’ does that still not mean I will end up with a post named ‘review’ for each artist, hence many posts of the same name? I am probably missing something here!
News - All news needs to sit in one place on a page of that name (so I guess the main posts page), and each /artist/news/ page will pull through just posts related to that artist using categories. Is that possible with what you have suggested?
Again it depends, there are multiple ways of doing it & there’s no right way, only what suits you best what you can easily maintain & scale. I would personally go with the former approach I suggested, create one post of “review” type for every review.
But here also you can manage images in reviews with a little bit of trickery. Will you allow reviewers to upload images? If yes then you can attach the images to the “review” post and inject the image URL into the comment body.
“review” will not be post name, it will be the post type (the custom post type you will create for reviews). So you will not create a normal post with “review” as name. Custom post types don’t show up among normal posts.
In that case, create a custom taxonomy called “artist” where a term name can be artist name. Then when you write a news post, assign as many artists to a news post you want. In this case news post won’t have artist parent, news posts will have one to many relationship with artists, ie., a news post can be related to more than one artist if need be. When you want to query news posts for an artist, you use tax_query to fetch all news posts of that particular artist.
Yes I understand that Custom post types don’t show among normal posts. So with the naming would you suggest that the titles of these posts be the artist name?
Yes that would be ideal, however you won’t be needing title of the review post even if you’re creating only one for each artist. Set the parent as the ID of artist and query using that.