Support

Home Forums Events Calendar Add-on Colored Categories Not Working After Update

Colored Categories Not Working After Update

Posted: April 21, 2015 at 12:52 pm


infosolwebadmin

April 21, 2015 at 12:52 pm

I was slow to update the calendar to the latest version and after updating I can no longer get colors to show up on the calendar outside of the default blue. All of our events will have at least two categories assignedto them FYI. We offer education/training, so whenever one of our courses is guaranteed to run I would select the corresponding GTR category for it, which was colored green on the calendar. Since the event would already have categories selected, I would deselect them all and then only select the GTR category, update the event, and then reselect the other categories it needed and reupdate it. That would get the first category’s color (GTR – green) to show up on the website calendar since it was the first category selected. That trick no longer works, any help? I’ve tried a few different things and cant get any of them to work.

Also, I’ve got CSS enabled and color pickers turned on in the calendar settings. Here is a link: http://events.infosol.com/events-calendar/

And in case you need an example, the event on May 1st would have showed up green before the update.

Thanks


Lorenzo Orlando Caum

  • Support Staff

April 21, 2015 at 1:33 pm

Hi Yolande, could you double-check the disable categories option in WP-admin –> Event Espresso –> Calendar Settings –> Memory Management?

That needs to be enabled:

http://cl.ly/image/1Q0H3B250L0r


Lorenzo


infosolwebadmin

April 23, 2015 at 10:27 am

Sorry about the delay, I just checked and it is set to no.


Lorenzo Orlando Caum

  • Support Staff

April 23, 2015 at 12:58 pm

Hi Yolande,

Could you change that setting to yes and save changes? That is needed for the event category colors to work.


Lorenzo


infosolwebadmin

April 24, 2015 at 12:40 pm

I’ve set it to yes and played around with some of the events and I can’t get anything but the default color to show up. Are you able to get category colors to show up when you have multiple categories selected? It isn’t working for me. Thanks


Lorenzo Orlando Caum

  • Support Staff

April 24, 2015 at 2:33 pm

That should still work. Do you have a color set for each event category?


Lorenzo


infosolwebadmin

April 24, 2015 at 4:08 pm

Yeah I’ve got the colors set the same as before, it was all good and then stopped working after the calendar update so I am not sure what’s changed. If multiple categories are selected, you know the logic behind which color gets chosen? It seemed like before it defaulted to the first category that was selected, but it’s not doing that anymore. Thanks again


Lorenzo Orlando Caum

  • Support Staff

April 25, 2015 at 1:59 pm

Hi, according to our recent testing, it should go with the first one.

What happens if you try removing the categories colors and then applying them again?


Lorenzo


infosolwebadmin

April 27, 2015 at 5:27 pm

Tried that out and it’s still not showing up with the category color.


Tony

  • Support Staff

April 28, 2015 at 2:48 am

Hi Yolande,

Are you comfortable with a little PHP?

With the latest calendar update the Categoris are organised alphabetically, this allows you to alter the names to change the order in which they apply giving more control.

However, we also included a filter to allow you to change this. Adding something like:

function my_remove_ee_category_color_sort() {
    return false;
}
add_filter( 'filter_hook_espresso_calendar_category_color_sort', 'my_remove_ee_category_color_sort' );

To your themes functions.php file or a Site Specific Plugin should force the Calendar to revert to the original functionality.

So if you a that snippet to your site, do the colors work as expected?


infosolwebadmin

May 1, 2015 at 1:13 pm

I am comfortable with a little PHP change, so I can give that a shot. However with the new update, the first category selected should display that categories color right? I made a category that starts with ‘a’ so it’s at the top of the list and I still can’t get the color to show up. Not sure what I am doing wrong.

Also, the ‘Disable Categories’ option in the calendar settings seems like it should be set to ‘no’ to me if I want the colors to show up?

‘Disabling categories in the calendar may potentially speed up the calendar and allow you to load more events, but you will not be able to use the category colors and css class options.’

Either way, I flipped the setting between yes and no and can’t get the color to show. I use google incognito to make sure I’m not caching old colors as well. Thanks again


Tony

  • Support Staff

May 1, 2015 at 1:25 pm

I am comfortable with a little PHP change, so I can give that a shot. However with the new update, the first category selected should display that categories color right? I made a category that starts with ‘a’ so it’s at the top of the list and I still can’t get the color to show up. Not sure what I am doing wrong.

With the latest update the order the categories are selected shouldn’t matter, they are sorted alphabetically before selecting the category to use for the colour.

However the code I gave you above disables that so that the calendar behaves in the same way it did before the update.

If you want to try adding ‘a’ to the beginning of the category name that you want to use you’ll need to remove the filter I gave you above.

Also, the ‘Disable Categories’ option in the calendar settings seems like it should be set to ‘no’ to me if I want the colors to show up?

Yes you want disable categories to be set to No. If that is set to Yes then the calendar does not pull in any information for the categories.

The support post ‘Colored Categories Not Working After Update’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso