This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I have a hosting client who has a site where he lists local music shows coming up and right now it's built on a custom Yii-based CMS, which is a piece of crap and falling apart. He would ultimately like to build something that he could replicate and sell but, for now, my main concern is getting something together that won't fall apart every time we try to extend the functionality.
I can give a link to his site as it is but, basically it just lists upcoming artists/shows, by date, then venue, in a 4-wide grid. Taking a look at how to structure things, this is what I've come up with so far:
- CPT for Venues
- CPT for Artist
- CPT for Event
- ? for Festivals
- Categories for events to differentiate shows, parties, etc.,
- Meta fields for events for things like age or entry restrictions, times, etc.
- Each Event would have 1 Venue and one or more Artists
- The homepage would list all upcoming artists, as described above (and below).
- Artists page, in the same format as the homepage, showing all artists
- Venues page, just like the "Artists" page
First we would go through and add all of the local venues, then import any artists in the existing database. From there, I'm imagining that he could just create new "Events" and assign a "Venue" and one or more "Artists" but, there are a few points that I'm sticking on:
- What is the easiest way to associate child-posts ("Artists") from a parent ("Event")? I guess I'm picturing an "Add Artist" button on the "Event" post-page.
- What is the best way to handle "Festivals", which may have several Events? Should I just do a CPT and link the events to the festival, just like I do artists to an event? I guess I could then use a meta-field to specify whether to display child events/artists on the homepage or a Festival-specific page?
- What is the easiest way to show all artists, by day, then venue, on a page? I know I can constrain the loop to only search for posts with a meta-date value in the future but, how would I search for all posts in the future, sort by date, then event but, instead of displaying the events, show the individual artists?
For example, if I search events, constrain and sort them, I'll end up with something like:
11/1/14 - Band 1, Band 2 @ Venue A
Band 3, Band 4 @ Venue B
"Special Event" @ Venue C
What I want is:
11/1/14 - Band 1 @ Venue A
Band 2 @ Venue A
Band 3 @ Venue B
Band 4 @ Venue B
"Special Event" @ Venue C
Do I need to build a custom, nested loop where I search by days, sort by venue and then do a new lookup/loop for all of the artists at that venue, on that day? That seems like it would hit the database excessively so, is there any way to customize a single loop to do what I'm describing?
Also, this is further down the road but, what is the best method for accessing the WP database, from outside of WP? Should I just create another user with read (and if they're needed, write) permissions and then treat it like any other DB or, is there a preferable API or interface for doing that and, if so, would it work with the Custom Post Types and Taxonomies I'm describing above?
There are other things he wants included like "favoriting" venues or artists to get custom calendars and notifications, ad-management, user-system, sorting by venue and/or genre, maps, etc. but, I can figure that out later. For now, I'm mostly wanting to make sure I'm approaching this project from the right angle and not missing anything obvious.
If anyone has any questions or suggestions, I'm all ears and will do what I can to explain things further.
Subreddit
Post Details
- Posted
- 10 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Wordpress/c...