Generate .ics calendar files dynamically?
I have spent all day researching blogs and forums on this.
I want to dynamically generate an .ics calendar file so that Outlook Calendar users etc. can save our events.
We have WordPress posts under the category “events” and I’m trying to make a custom template for those posts called events.php.
I found this code online, and it works, but we don’t want this to automatically popup when users view the event post. Instead, we want a little button or link that says “add to Outlook Calendar” and then it pops up with a download/open box.
We want to use “custom fields” in this code too, to generate the date, time, location, and event description dynamically. The main problem is really converting the below code to a “clickable” code…
Anyway here is PHP code that works but needs hacking:
Thank you for any feedback or suggestions!
- The topic ‘Generate .ics calendar files dynamically?’ is closed to new replies.