This shortcode creates a link that your visitors can use to subscribe to events on your site via Google calendar, or another calendar application. It also supports subscribing to specific venue or category feeds.
Important: Its intended that you wrap the shortcode around some form of text prompting the user to subscribe to your event calendar.
Usage
[eo_subscribe class="button" title="Subscribe with Google" type="google"] Subscribe to our calendar [/eo_subscribe]
How the subscribe to events shortcode works
The shortcode wraps the passed content in a link (<a>
) tags, which allows visitors to subscribe to your events; there are three types:
- ‘google’ – creates a link which allows visitors to subscribe to your events with a Google calendar.
- ‘webcal’ – The application that deals with a ‘Webcal’ link will depend on the visitor’s browser.
- ‘ical’ – Finally ‘iCal’ points directly to the iCal feed (This is useful for a subscribe link for iPhones iOS 5+ ).
When a visitor subscribes to your calendar, any changes made to events will be updated on subscribers’ calendars (if their calendar supports this). The events feed includes only public events (draft, private and trashed events are not included).
Attributes
- type : ‘google’ or ‘webcal’. Default ‘google’.
- title: The ‘title’ attribute for the wrapping
<a>
tags. There is no default value. - id: The ‘id’ attribute for the wrapping
<a>
tags. There is no default value. - class: The ‘class’ attribute for the wrapping
<a>
tags. There is no default value. - style: The ‘style’ attribute for the wrapping
<a>
tags. There is no default value. - venue: For venue specific feeds. The slug of a venue.
- category: For category specific feeds. The slug of a category.
Examples
For a ‘live’ example of this shortcode, checkout the demo: http://wp-event-organiser.com/demo/ical-feeds/
Add a ‘subscribe to events’ button: the following adds a (Google) subscription link to the text ‘Subscribe to Events’, with class ‘button’ and title ‘Subscribe with Google’.
[eo_subscribe class="button" title="Subscribe with Google" type="google"] Subscribe to Events [/eo_subscribe]
Add a Google subscription link with a Google calendar image
[eo_subscribe title="Subscribe with Google" type="google"] <img src="//www.google.com/calendar/images/ext/gc_button1.gif" alt="0" border="0"> [/eo_subscribe]
Add a ‘subscribe to events’ button using webcal for the venue “my-venue”:
[eo_subscribe title="Subscribe to our events" type="webcal" venue="my-venue"] Subscribe to Events [/eo_subscribe]
(The shortcode can be used around div-elements as well just plain-text, to allow you to create a button effect with CSS).