The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

amr ical events lists
ADD ics categories (8 posts)

  1. chicagoave
    Posted 5 years ago #


    I have amr ical events setup on wordpress to pull in calendar data from an ics file and display as a large calendar and as a sidebar widget on my blog. I would like to stylize the text color of the events on the large calendar and widget based on the CATEGORY data in the ics file through a CSS style.

    How can I do this? I have enabled the category field to show up but it displays as text before my event title. I try and use the 'before' and 'after' config fields to place the category name in a span but it converts my html to text.

    Any help would be greatly appreciated. Thanks.


  2. dennishall
    Posted 5 years ago #

    You can use the a custom.css.

    Trace the styles with FF or your preferred tool and inject your own styles to test it, then recreate those style in you custom.css file.

    Using these basic tools, you can even restyle pages in iFrames if you understand Cascading Style Sheet principles trace the style paths.

  3. chicagoave
    Posted 5 years ago #

    But how do I get the categories to show up as styleable classes in my large calendar layout?

  4. anmari
    Plugin Author

    Posted 5 years ago #

    Hi guys,

    the classes are already in the html - you do not need to do anything.

    either by id (using t## - t for term because one cannot have a selector starting with a number. So t3 is the class for category or taxonomy term with id 3)
    or by term name (category name etc).

    Although in checking I have just seen that where there are multiple categories, the classes are being squished together.

    To fix that if you want to use names.

    Change the code in file amr-ical-events-list-main.php in lines 1166 and 1167 to

    if (isset($e['CATEGORIES'])) {
        if (is_array($e['CATEGORIES']))
    	$e['Classes'] .= ' '.implode(' ',$e['CATEGORIES']);
    	$e['Classes'] .= ' '.$e['CATEGORIES'];

    It will be like that in the next update.

    See also http://icalevents.com/3590-style-events-by-category/

  5. chicagoave
    Posted 5 years ago #

    Thats the thing, the categories aren't showing up in my layout. I'm using large calendar 9 and list type 4. Here's the code being generated on the large calendar 9

    <div class="event history inprogress untimed allday cal0 vevent array">
    <div class="details1">Anniversary for John N -  2 Years </div>
    <div class="details2"><div><br></div> </div></div> 
    <div class="event history inprogress untimed allday cal0 vevent array">
    <div class="details1">Happy Birthday to Amber T</div>
    <div class="details2"><div><br></div> </div></div>

    and here's the data (shortened) from my ics file.

    CATEGORIES:Green Category
    SUMMARY;LANGUAGE=en-us:Anniversary for John N -  2 Years 
    CATEGORIES:Orange Category
    SUMMARY;LANGUAGE=en-us:Happy Birthday to Amber T


  6. anmari
    Plugin Author

    Posted 5 years ago #

    that 'array' is probably the problem - it is working for internal events, so must be ics files not working - will look into it and get an update up.

  7. anmari
    Plugin Author

    Posted 5 years ago #

    See version 4.0.15

  8. chicagoave
    Posted 5 years ago #

    thanks so much. working now. you are amazing.

    There is another bug I've come across having to do with external files. But it's probably outlook's fault rather than the plugins.. thought I'd point it out anyway in case you had a fix. By defualt long events wrap to two lines on export and appear as a line break. The plug-in ignores the break and only displays the information before it. I do a search an replace to fix it after I export my file but thought I'd point out what's happen.

    For example with this code the second line won't be displayed by your plugin and I have to search and replace to change it to fit on one line.

    SUMMARY;LANGUAGE=en-us:Anniversary for Kevin M - 19 Years\, Gary D
    	 - 5 Years\, Chris H - 5 Years

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • amr ical events lists
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic