Recently I had a client who needed an single “Add to Calendar” link on her site for an upcoming event. She didn’t want a full event plugin on her site since she rarely hosts events, but wanted her viewers to easily be able to add this event to their calendar. I searched for a plugin that would add this functionality but couldn’t find one that would do this without adding a whole calendar/event functionality.
But then I found AddToCalendar. It’s free and there are no ads that come with it. Just fill out your own info within the sample code and add to your site! The only thing will be a small addtocalendar.com link when people actually add it to their calendar, but for me, this wasn’t a problem. I suppose you could remove it from the script if you really wanted to, but it seems like a small price to pay to have it all written out for you.
I like that it has options to include Google Calendar, iCalendar, Outlook, Outlook Online and Yahoo! Calendar.
First, they give you a link to add to your header.php file:
<link href="http://addtocalendar.com/atc/1.5/atc-style-blue.css" rel="stylesheet" type="text/css">
Next, add their simple script to your post or page in the TEXT editor:
No need to add this to the special scripts section, just add it right into your TEXT editor.
You’ll need to customize the second part with your own event info. If you’re an American like me, remember that the sample date is May 4th and NOT April 5th! It goes year-month-date.
Be sure to test it to make sure it works! I got messed up on the timezone part, but just visit their site and click on the Event data options tab near the bottom. There you will see a dropdown where you can find your correct timezone. I had forgotten to put the underscore where the space is in “New York”.
Since I added the CSS to my own style.css file instead of linking to theirs, I was able to customize it so my button is pink instead of blue. But they have several options of style sheets you can link to so you can options of pure text or even icons. Check it out and let me know what you think!
NOTE: You must do all of your edits in the TEXT editor. If you switch over the visual editor, WordPress will automatically disable this code.