Support

Home Forums Event Espresso Premium More custom post type

More custom post type

Posted: January 21, 2014 at 3:05 pm


Mirko Falavigna

January 21, 2014 at 3:05 pm

Hi all,
I would like to create a new second custom post type (for example courses). This can be useful when you select to create a new post from the event.
For example I would like to have a “event-espresso” custom type for all events (with url http://www.mywebsite.com/event-espresso/test), and a custom post “courses” for all courses with the url http://www.mywebsite.com/courses/test.
Is it possible?
Thank you very much!


Dean

January 22, 2014 at 1:39 am

Yes it is possible but you do need to edit a core file to achieve it, something we don’t recommend.

Start by adding your new Custom Post type, either via the theme or plugin or a custom function file.

Then in event-espresso/includes/admin-files/event-management/new_event_post.php edit line 34 to read something like

        $custom_post_array = array(array('id' => 'espresso_event', 'text' => __('Espresso Event', 'event_espresso')), array('id' => 'XXX', 'text' => __('YYY', 'event_espresso')));

Where XXX is the slug of your custom post type and YYY is the display name for it.


Mirko Falavigna

January 24, 2014 at 1:49 am

Thank you very much Dean!
It works!!!


Dean

January 24, 2014 at 4:38 am

You’re welcome!

The support post ‘More custom post type’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso