Add custom taxonomy to Community Events form
I’ve added a custom taxonomy, locations (the county), to my events, which I now have displaying in my month and detail view. Now I want users to be able to select the location.
This is the Event Details, with Location showing just under Details:
I’m assuming I would add this to taxonomy.php but need a hint as to how to do this.
Oh boy! This is a challenging request. It seems very possible, but I’m afraid I can’t put too much time in, as this level of customization goes beyond the scope of the forums.
Custom taxonomy is built into WordPress, so you are able to utilize they core API to add and extract it pretty easily, once it is registered.
However, our Community Events form isn’t exactly built for it. Our tax system is built around ‘tribe_events_cat’, so you’ll need to go quite a bit farther to render the form, validate and save. It is standard CRUD though, so it shouldn’t be too hard.
So the ‘views’ folder is only part of the equation, but yes I think the taxonomy.php is where you would render the form for your custom tax. You need to make sure it is saved to the right place (after validation) and I don’t think CE is built for that. It won’t look to save an extra taxonomy (I don’t think).
If I were tackling this I would search the Community Events plugin files for any filter I can find (set up with apply_filter). You’ll find a few submission and validation filters where you might be able to interject your custom submission data.
Does this make sense? Let me know if this doesn’t work for you.
– Casey Driscoll