I am currently designing a musician’s wordpress theme, and am looking to create a user-controlled dynamic gig list. I’ve done this before using PHP, but am wondering what the best way to do it in WordPress would be.
I’ve tested a method using custom post types, but I feel like some users would be confused about creating “post” for a an event, and then having to write the date in a custom field at the bottom.
How can I get my theme to create it’s own table in the wp database? Can I avoid that and make my own “insert gig” interface that creates a custom post type, but with an easier to understand “date, venue, about” way of inputting the info?
Create a Custom Post Type named “Gig” and WordPress will take care of the UI creation, then all that is left for you is to add a Metabox with the fields you want (date, venue, about).
Here is a simple step by step guide:
First: Register Your Gig Post Type
This will give you a new Post Type and an admin UI for creating your gigs:
Next you need to create a Metabox (to avoid using the regular custom fields)
There are a million tutorials online on how to create and add your Metabox so I’m not going into that but I’ll show you a fast easy way to do it.
Download this class and once you put this in your theme the creation of the Metabox should be something like this:
You will end up with something looking similar to this:
Here’s another image to show the fancy timepicker:
To read more on the field types you can use and add to your Metabox read this.
That’s about it! Just to wrap up I’m posting this as a plugin to test but make sure you download the Metabox class first so it will work.
I’ve used GigPress before and it works really well.
http://gigpress.com/
Might I suggest Event Organiser?
Full disclosure: this is a plug-in I’ve developed
It essentially does what you are attempting to achieve (creates a custom post type), allows date selection, venues and custom fields so it can be extended for your own particular use.
As for incorporating it into your theme, there are four basic ‘example’ templates the plug-in comes with. Just copy these into your theme folder and you can edit them however you like, making use of the template functions that come with the plug-in to display event/venue details.