Tag Archives: category

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.



Style events by category

Finally someone wants to use the category to style their events.  Yeah!!

As of the latest version you can do this with your remote ics file (free version) too if the ics file has categories.  If using amr-events,  taxonomies and tags can be used to.

You’ll need to do one of

  • a custom css file, or
  • use the safecss plugin (the wordpress.com custom css plugin ), or
  • update your theme’s css (beware of upgrades)

Example with border colours

I like the Sydney Film Festival css (not my plugin, although you can do something similar now)

Sydney Film Festival Category Styling

The plugin issues a bunch of css classes for an event;

<div class="event future recur concerts moving streetfight t47 t54 t55">

These css classes are categories by term id: t47 t54 t55
These css classes are categories by slug:  concerts moving streetfight

The other classes indicate that it is an event (not a task or note), it is in the future (not past, or today), and that it recurs.

To style your categories like that with my plugin and the default 2010 theme, add something like this to your custom css:

#events_wrap div.t## {	border-left: 5px solid #F7931D;}

where t## is your termid or category id.  It may be safe to use id’s, in case you decided to change the category name and slug and forget that it will mess up your css.   The id will still work.

#events_wrap div.yourcategoryname {	border-left: 5px solid #F7931D;}

Example with text colours:

The following example is specific to someone’s website.  You’ll need to

  • use your category or taxonomy names
  • check what selectors will work you and for your chosen listtype.
Events coloured by category

Css added to the default css:

/* custom css */
#content table.largecalendar .spanish  a.url {
	color: #F7931D; /*orange */
#content table.largecalendar .mandarin  a.url,
#content table.largecalendar .mandarin  a.url:visited {
	color: #EC5577; /* pink */
#content table.largecalendar   a.url {
	font-weight: bold; /* maybe bold them all too ? */


Check whether you need to override your theme’s ‘active’, ‘hover’, ‘visited’ states too as per the mandarin line above.