Posted: November 29, 2013 at 10:04 pm
|
Hi friends, I’d like to add an event with 2 categories (Category A, B). I have assigned Cat A with specific colors, and B with no specific colors. However when I add the event to calendar, it shows Category B color (default calendar color) instead of Category A’s color. How do i put Category A’s color as a priority? Thanks!
|
Hi there, You can make category A’s colors a priority by adding a few lines of CSS to your custom stylesheet. For example, if category A’s unique identifier is “category-a” then something like this can be added to make these events have a red background with white text: .category-a, .category-a a { color: #FFF; border-color: red !important; background-color: red !important; } |
|
|
Hi Josh, Does it mean that I do not have to set a color at the “Event Categories” to make it work? Our events will require the admins to select 2 categories. 1) The type of event. 2) Whether the event is free or premium. There are 5 types of event: A,B,C,D,E I would love to make these 5 events of priorities in color than whether it is free/premium. Will adding 5 of the above-mention work? Or is there another way around it? Thanks! |
|
Hi, The CSS code doesnt seem to work.. I have set 2 categories that are of higher priority, mutually exclusive. Site is * redacted * The CSS code i used is: <code>.free-event .free-event a { color #FFF; border-color: #33b408 !important; background-color: #33b408 !important; } .premium-event .premium-event a { color #FFF; border-color: #2257ce !important; background-color: #2257ce !important; }</code> Thanks! |
|
I’ve added 2 examples of events on 31 December 2014. Please take a look at the event on the calendar. (URL above) One should be in green and other should be in blue. But both were in the default blue color even when custom css was added. |
Hi there, I looked, but do not see events for Dec 31st. Also, I don’t see the custom styles loading onto the page. You might try adding the custom styles to the child theme’s style.css, since it appears that your active WordPress theme is loading up an additional stylesheet here: * redacted * |
|
|
Hi Josh, The 2 sample event is placed in 2014, 31 Dec. Not in year 2013. Sorry if I did not make it clear. Anyway it’s weird that the CSS didn’t load up. I customised other CSS onto the Custom CSS plugin and they worked perfectly. |
Hi there, Your custom css (took me a little while to find) is loading in a rather unusual way. * redacted * The sccss_style-css line is the custom css. Although the browser is not recognizing it as it it not loading correctly. I would suggest using the My Custom CSS plugin, copying your exising css rules into that and removing what I assume is the ‘simple-custom-css’? That seems why the calendar is not displaying your custom colors. |
|
|
Hi Tony, Thanks for the response. I’ve installed My Custom CSS, but it is still not working. This was what added to the My Custom CSS plugin: .premium-event |
|
Hi, There is a typo in your code, each rule must have a comma around it unles sit is the last one, like this: .free-event, An example – http://d.pr/i/RMBm |
|
Hey Dean, Appreciate your help too, Josh & Tony 🙂 |
|
Great stuff! |
The support post ‘Category Colors’ 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.