Linking Events to Different Single Post

Home Forums Calendar Products Events Calendar PRO Linking Events to Different Single Post

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #940338
    digisavvy
    Participant

    I’ve got a project I’m working on with a few post types. Classes, Shows etc. Classes and Shows each have fairly unique layouts, both are items we want to manage from Events Calendar Pro in that we want the show dates times to appear on the calendar. However the event links on the calendar we want to go to the associated Post Type, whether it’s a class or show. I’d probably use something like post2post to relate the post types together. Just curious if this is something that’s “doable.” Or if there are better ways to approach. Thanks.

    #940406
    Geoff
    Member

    Hey there, Alex! Welcome to the forums. 🙂

    Interesting question. Currently, there is no way to associate the Events post type with another custom post type right out of the box. That’s something Posts2Posts or another plugin would have to accomplish, unless you want to take on that level of custom development.

    Alternatively, you could use the additional fields feature (Events > Settings > Additional Fields) to create a field for the URL of the custom post type post you want to build a relationship with, then link to the custom post type post from the event post. Not exactly what you’re looking for, but it would certainly help you avoid having to do custom development.

    Sorry I don’t have more of a concrete solution for you, but does this at least help answer your question? Please let me know. 🙂

    Cheers!
    Geoff

    #942173
    digisavvy
    Participant

    THanks for the reply here. I’ve go the post relationship part down now, using Post Connector.

    The part I’d probably need advice on is on how to link to the appropriate post from the Event Calendar/List view. Because I’d have one show, with many Events, or one Class with many Events. My workflow would be to Create a Show, add an Event that is associated to the show. The Event, by default, is what is linked to from the Events Calendar/List view. Can I change where the link goes? Does that make sense? I know you can’t provide me code or anything, but advice would be helpful.

    #942322
    Geoff
    Member

    Interesting question!

    The link for an event is echoed using:

    <?php tribe_event_link( $post ); ?>

    You could likely write a filter that intercepts the tribe_event_link() function and replace $post with the Show post type ID instead. That would certainly do the trick.

    Or, perhaps you could override the calendar template and modify it so it includes your custom post type link instead of tribe_event_link(). The template you want to override depends on the view you are using for the calendar, but our Themer’s Guide provides a thorough outline of all the available templates and how to override them in your theme files.

    Does this help? Please let me know. 🙂

    Cheers!
    Geoff

    #945823
    Geoff
    Member

    Howdy Alex! This thread has been quiet for some time, so I’m going to go ahead and close it. Please feel free to open a new one if any other questions come up and we’d be happy to help. 🙂

    Cheers!
    Geoff

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Linking Events to Different Single Post’ is closed to new replies.