Support

Home Forums Event Espresso Premium Event relationship – Post2post

Event relationship – Post2post

Posted: October 11, 2012 at 6:40 pm


Stuart Buchanan

October 11, 2012 at 6:40 pm

Hi,
I’m interested in setting up a relationship between events, so I can list related events on my event. is that possible?
Until now I was using Post 2 Post. But since Event Espresso has it’s own UI and own tables, I’m not sure how that would work.
This is how I would guess I would setup the relationship. But how do I get the relationship admin box to come up?

p2p_register_connection_type( array(
    'name' => 'eventespresso_to_eventespresso',
    'from' => 'eventespresso',
    'to' => 'eventespresso',
    'admin_column' => 'any',
    'cardinality' => 'many-to-many'
    //
) );


Stuart Buchanan

October 11, 2012 at 6:48 pm

I’ve noticed that I can turn on the custom post types from the template options. But when I create a post using the event section, it doesn’t have any of the options of the ones I create from the event espresso section and it doesn’t have the post2post admin box for the relationship after setting the relationship up for custom post type: espresso_event


Dean

October 12, 2012 at 1:05 am

Hi Stuart,

Just to clarify the Events as standard are a custom post type, the Posts that you create in each event are just standard posts, to be used in the blog roll. You can create a 2nd custom post type, confusingly called events, which is separate to the actual Events.

Simply turning the Custom Post Type option on unfortunately needs further work to set up – see here https://eventespresso.com/forums/2010/11/custom-post-type-example-code/ – the documentation is a little old, working on a newer version currently.

The custom post type for events is espresso_event, but I think you will find it difficult to implement without further coding changes, as I could not get the plugin to stop giving errors.

The support post ‘Event relationship – Post2post’ 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