WP FullCalendar
[closed] Colours not used on all events (15 posts)

  1. Beee
    Posted 2 years ago #

    I installed WP Full Calender to colour my events used with the events manager plugin.

    I added 2 colours to my categories race (red) and freeride (green) and expected all events to use that colour, but it's not consistant.

    Current month:
    The only event which is coloured is the freeride. The races (which should be red) don't have any colour.

    Next month:
    Only 1 race is red. The second one has no colour.

    Don't know why this happens.


  2. Beee
    Posted 2 years ago #

    I just came to the conlusion that it might be because each event has multiple categories.

    My directory structure is as follows:
    - Classic luge
    - Drift trike
    - Gravity bike
    - Inline
    - Standup
    - Street luge
    Event type
    - Freeride (#ceeecc)
    - Misc
    - Race (#e5454a)

    Can it be that the colour is overwritten by a category which colour isn't defined (by me) ? And if so, how to prevent it ?

    I only want to colour the event types, not the disciplines.

  3. angelo_nwl
    NetWebLogic Support
    Posted 2 years ago #

    did you have multiple category in one event?

  4. Beee
    Posted 2 years ago #

    one for discipline, one for event type

  5. Beee
    Posted 2 years ago #

    can you maybe tell me how the categories are identified uniquely ?

    I have a custom css template which is loaded last in the header, so anything I define there overwrites any previous values in css.

  6. Beee
    Posted 2 years ago #

    I just found out the colours are hardcoded.

    I see two colours, because there is only 1 category colour defined (of 3 used categories, but since 2 are white, I think the code only shows white only once.)

    I see this being used.

    <div class="fc-event-inner fc-event-skin" style="background-color: rgb(229, 69, 74); border-color: rgb(229, 69, 74); color: rgb(255, 255, 255);">

    Isn't it an idea to give each item a unique class like post_class() ?
    Instead of just "fc-event-inner fc-event-skin" because this doesn't identify an event uniquely.

    In my case this event would then have 3 categories;
    1) category-slug1
    2) category-slug2
    3) category-slug3

    <div class="fc-event-inner fc-event-skin category-slug1 category-slug2 category-slug3"

    These can all be identified uniquely through a stylesheet.

    I think it's a good idea to include tags here as well.

    The other idea is to only define a colour when the value is set. So upon initialization, the category (bg) colour should read none, instead of white. If the value is none, it shouldn't be hardcoded.

    Anyway that's my 0,02...

    If anyone knows a way to hook in a custom piece of code for it, I'm interested.

  7. AJD
    Posted 2 years ago #

    I just posted a similar question here.

    I agree that your suggestions would help, either by adding a class for the category, or defining a color only when the value is set.

    So far I haven't figured out a way to precisely set colors when multiple categories are used.

    Even when only one category is used, it appears that the parent category overrides the child, which seems backwards to what I want.

    parent-cat (RED)
      child-cat (BLUE)
    2parent-cat (black)
      2child-cat (white)

    If the an event has both 'parent-cat' and 'child-cat' assigned its color will be RED.

    However if it has parent-cat, child-cat and 2child-cat assigned it will be white.

    EDIT: my second line of logic seems to be off. The color assignment is not consistent when a second child category is used. Maybe it is alphabetical or in order of category creation?

    EDIT: It appears as though the hierarchy of category colors is determined by the alphabetical name of the category.


    boats (black)
        big (white)
        small (blue)
    yachts (green)
        yachts-small (pink)

    If 'big' is assigned the color will always be white, no matter the other categories assigned.

    The only way to make the category 'pink' color to show up is if 'yachts-small' is the only category assigned.

  8. Beee
    Posted 2 years ago #

    Yeah, i think so, but I don't want that...

    each event needs a type; race, freeride, misc
    and it needs one or more disciplines.

    I'm only looking to colour the disciplines for now.

  9. AJD
    Posted 2 years ago #

    Agreed, I would like full CSS control of the colors.

    I figured out a way to work around it for now. It's definitely not optimal, but it works.

    I created an additional category for each color that I want to use. I set the color and started the title with a number to ensure that it will always be first alphabetically.


    Then assign those categories to events.

    Then I used this snippit in functions.php to exclude the new categories from the 'All Event Categories' dropdown list.

    // if we need to exclude things from the dropdown category menu on the calendar page
    function em_wpfullcalendar_category_label($taxonomy_args,$taxonomy){
     if ( $taxonomy->name == 'event-categories'){
      $taxonomy_args['exclude'] = '90,55,109,24,114'; // categories to exclude
     return $taxonomy_args;

    There are a few other places to exclude the color categories as well. `[fullcalendar category="-190,-55,-109,-24,-114"]
    [events_list category="-90,-55,-109,-24,-114"]`

  10. Beee
    Posted 2 years ago #

    I appreciate the time you took to create a solution but I find this too much hassle, the more since this is too much work for just adding a simple colour, with an option partially there...

    imo it needs some tweaking

  11. Beee
    Posted 2 years ago #

    I just hope Marcus has read this topic...

  12. AJD
    Posted 2 years ago #

    I submitted a feature request on this, asking for more fine-grained category color handling.

  13. Beee
    Posted 2 years ago #

    did you get an answer and if so what was it ?

  14. AJD
    Posted 2 years ago #

    Nothing conclusive, yet.

  15. fquiquet
    Posted 2 years ago #

    Need a solution too for that.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP FullCalendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic