Category Colours for events

This topic contains 2 replies, has 2 voices, and was last updated by  Madeleine Parkyn 5 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43317

    Hello
    Thanks for the great plugin. We’ve been using if for years now – trouble free 🙂

    I have a query about colours on the calendar and posterboard. When an event is assigned several categories which have colours, what determines which colour is shown on the calendar? Does making one of the Categories ‘primary’ have any effect?

    Many thanks for your help.
    Madeleine

    https://www.southwellminster.org/whats-on/events-calendar/

    Madeleine Parkyn
    #43335

    Hi Madeleine,

    The code for getting the colour associated with an event is here.

    In short, it retrieves all the event’s categories from the database and uses the colour of the first category it gets to that has been assigned a colour. Having tested, it appears that the categories might be ordered by their name. If so then the first category with a colour when sorted by name determines the colour of the event.

    Stephen Harris
    #43339

    Thank you Stephen. I’ll try working with that.

    Out of interest, what is the effect of making one of the Categories ‘primary’ ?

    Have a good weekend
    Madeleine

    Madeleine Parkyn
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.