Tag Archives: ics

Categories from ics files

An ics file may have ‘CATEGORIES’ in it.  For formatting purposes, the plugin treats these  similar to the wordpress ‘Category’, and will ‘mimic’ the links that are generated by wordpress categories.

Unlike wordpress event category or taxonomy based selection, selection of ics events via shortcode parameter is not currently offered.  It is preferable (more efficient) to do your selection of events for your ics file page by selecting the events for your ics file at the providing system side.  Hopefully the providing system offers the necessary parameters, as the amr-events plugin does when it offers ics feeds.

A tailored ics feed reduces the size of the file and the number of events that have to be parsed unneccesarily by this plugin.  Those ics files can get big over time, so if you have the option to select only current and future events, do that too!

For example of tailored ics feeds, see the demo site for amr-events – one can see that multiple selections are available from the amr-events to tailor an ics feed.

Example ICS Extract:

CATEGORIES:New Technology,User Experience,Web Technology,Web Development,Computer programming,Software Development,Technology,Interaction Design,Internet Startups,Web Design,iOS Development,Graphic Design,Ruby On Rails,Python

The plugin will try to pretend that these are like wordpress categories, and will create ‘links’ behind the ics category names.   To demonstrate, use the default list type with your ics file. The CATEGORIES should appear below the description:

Example formatting of ics categories:

One can click on the links generated to see just the events with that ics CATEGORY.

Note that the whole file still has to be parsed before event selection can take place.



Google calendar ics files

If you are using a google calendar ics file as event input you should be aware of the following:

  • the ics file may get rather large over time.  At time of writing there is no way to get the feed to only show future events, so it will have ALL your old data.  This all has ti be parsed, turned into event data and held in memeory to see if there any any modifications, or exclusions.    If you don’t need the old events, try deleting them.  You may need a bulk delete tool.  I have used this GcalToolkit, not ideal but it does work.
  • At times the ics feed used to be slow to update – check what the actual feed contains if you think events are missing .  Open the ics file in notepad, and check if your events or your changes are there.  Note that an instance may have multiple VEVENTS with incremental SEQUENCE numbers later in the file.

On the other hand, when using an amr-events feed in a google calendar,  google can be slow to refresh reading the feed, sometimes it will do the first one fine, then you make a change and expect google to show in instantly.  It will not.  Not much we can do about that.

External ics files timing out?

Slow server? Ics refresh problems too frequent?

In version 4.0.24 of amr-ical-events-list, the default http timeout in wordpress can be extended for ics fetches.  5 is the wp default.

Note: using a large number may mean that your calendar page will be slow when it is time to refresh the ics files.  Consider the cache frequency too.

See also

Advanced admin settingfor timeouts

How to tell if necessary?

If you occasionally see a little exclamation mark on your calendar page – this is an attempt to warn you that  a cached version of the ics file is being used and events may be out of date.  Hover over it to see the message.

Want more info ?

If you are a logged in admin user, add ?debug&refresh to the url and hit refresh.  A debug listing will be produced while it tries to refresh. Scroll down to see the result.

Debug message for logged in admin users
Ics file does not exist

Html in descriptions in ics feed generation

What to do about html in event descriptions?

Some applications will cope with the html, but there are other applications which do not. EG: Google calendar – does not faciliate html nor  issue it in feed.

HTML in the description field is not explicitly forbidden, however it is probably not recommended.  There is some provision for html to be explicitly allowed for, either:

  •  in the description using an ALTREP parameter,
  • or in an ‘experiemental’  X field, X-ALT-DESC,

WordPress allows us to create events with html in them.  So what to do when the ics feed is generated?

Retaining the html – two possibilties:

Link to the html representation:

DESCRIPTION;ALTREP="http://www.example.com/somepath/":This is an example description.

Provide separate field with html representation:

Outlook will recognise:

X-ALT-DESC;FMTTYPE=text/html:<p>This is an example description.</p>


This update does both, as well of course ,as stripping the html from the description field in the ics file.  This means images will be stripped too (only for the feed – do not panic!)

More information for the technically minded