0

We are developing an events website and are wondering how we can provide an "add to calendar" feature. We don't actually have a calendar on the site and we are developing using Wordpress. Everything is search based. Does anyone know how can we generate the proper files so someone can add the event to their Google, Android, iPhone, iCal, etc calendars? Any suggestions are greatly appreciated. Thanks!

2 Answers 2

1

I see no one has responded, so here goes. You need to generate an ics feed (ie file). It is possible to do it per event, although usual use is for a whole calendar. The spec is RFC 5545.

In wordpress, you hook into the feed concept and write code to add a feed with ics suffix. Since wordpress allows feeds by category, tag etc even post id it really facilitates even having an oics file per event (assuming your events are post types)

There are some resource links and testing tools in the bottom right sidebar of icalevents.com. The site is mine, for my plugin which does exactly this. There are of course other plugins available at wordpress.org which do this wit varying degrees of success and completeness of the spec!

Note: Whether a person adds it to their calendar or subscribes to it as a separate calendar is up to them. One cannot force and 'add' into someones personal calendar.

1

you can use this jQuery icalender script. although if i were you, i'd change the markup so that it conforms with microformats2 h-event. lib: http://keith-wood.name/icalendar.html microformats2 h-event http://microformats.org/wiki/microformats2#h-event

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.