I recently purchased The Events Calendar PRO for our website. I have so far been able to mod it for our needs, with the help of 2 or 3 other plug-ins I was easily able to add a registration form to an event. Now I am looking to add the iCal link to the notification e-mail or on the confirmation page. Any suggestions on how to go about it? Maybe creating a function that would use code in the iCal.php or something? Thanks
Repurposing our code doesn’t sound like a bad approach here.
We do have a function that broadly fits your needs, here – tribe_get_single_ical_link() – but be aware it must be called within the loop (or, at least, you should ensure the global $post object is set to the correct event).
Ultimately though you may find it far simpler to just append ?ical to the single event URL 🙂
Thanks Barry! Adding that to the link seems simpler, just have it generate the single-event link with ?ical appended to it. I was initially looking at the function to see if it could dynamically do this for each event. Trying it now, I’ll let you know how it goes.
I’ll close this thread – but if anything else crops up please don’t hesitate to open a new thread and let us know: one of the team will be only too happy to help.
Last but not least, if you have a moment to spare we’d love to hear from you over on our plugin review page. Thanks again!