Support

Home Forums Event Espresso Premium Event import

Event import

Posted: August 22, 2017 at 10:49 am

Viewing 6 reply threads


rhumphrey

August 22, 2017 at 10:49 am

Hi guys

i have 55 events that i need to star inputting into this plugin, mi know there is no import feature on this version, which is kinda fine, but i have 5 basic events and everything else is duplicated from these, is it best to setup my 5 as drafts and then duplicate and then go through all events and change dates which is a little time consuiming but doable, or is there a better way to do this?

thanks


Josh

  • Support Staff

August 22, 2017 at 1:11 pm

Hi there,

Duplicating the events will work fine. If you want to change some of the defaults within a new event there are also some filter hooks you can use with some custom PHP code to customize the defaults. There’s some example code in the developer documentation that may help:

https://github.com/eventespresso/event-espresso-core/blob/master/docs/T–Tutorials/modifying-defaults-for-events.md


rhumphrey

August 23, 2017 at 10:02 pm

thanks for that, i also have some custom fields that i have added to each of the events, that i need to add when i duplicate the event, looking at this the duplicationi is controlled via EE, is there a way i can add the custom fields so that they get duplicated when i click the duplicate event button. long shot i know. 🙂

thanks


Tony

  • Support Staff

August 24, 2017 at 3:33 am

There’s an action you can use:

do_action('AHEE__Extend_Events_Admin_Page___duplicate_event__after', $new_event, $orig_event);

Hook in, pull each of the custom fields from the original event using get_post_meta() then update_post_meta() on the new event.


rhumphrey

August 24, 2017 at 7:57 pm

does this need to be placed in a specific file that event espresso uses, as i will use the duplicate event feature you already have?

thanks


Josh

  • Support Staff

August 24, 2017 at 8:30 pm

We recommend putting the custom code into its own site specific plugin. The action hook is already in Event Espresso core, you’ll actually use the add_action() function to hook into it with your own code.


rhumphrey

August 26, 2017 at 12:00 am

many thanks, got this working now.

Viewing 6 reply threads

The support post ‘Event import’ 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