Mini Calendar change colours

Home Forums Calendar Products Events Calendar PRO Mini Calendar change colours

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #952715
    handdrawnpixels
    Participant

    Hello –
    I want to modify some styling of my mini-calendar widget. Is it possible to add a class to each event with a category assigned to it? for example if the taxonomy and class is Theatre its Yellow, if its Dance its green

    I am using the following code in a different area of the site but can’t get it to work on the mini-calendar

    <?php $terms = get_the_terms( $post->ID, ‘tribe_events_cat’ ); ?>
    <div class=”boxes<?php foreach( $terms as $term ) echo ‘ ‘ . $term->slug; ?>”>
    <?php echo $term->slug; ?>
    </div>

    Thanks

    #953216
    George
    Participant

    Hey @handdrawnpixels,

    You can indeed make the customization you described here. While we can’t help with specific code examples, one thing that should be an enormous help is our official Themer’s Guide, which can be found here → https://theeventscalendar.com/knowledgebase/themers-guide/

    Using the principles in that guide, you can make a custom version of the /views/pro/widgets/modules/single-event.php file found in your copy of Events Calendar PRO and add custom class names based on the category.

    I hope this helps!

    Cheers,
    George

    #953366
    Andy Fragen
    Moderator

    You might give The Events Calendar Category Colors a try.

    It is a third party plugin. It does colorize widgets too.

    #953543
    handdrawnpixels
    Participant

    I have tried adding a custom class to the area suggested however it keeps repeating the same class, so all boxes are the same colour. The third party plugin doesn’t work with the background colours either.

    Any ideas?

    #953553
    George
    Participant

    Hey @handdrawnpixels,

    How are you generating your custom class? Can you paste your modified version of the /views/pro/widgets/modules/single-event.php file into a Gist at http://gist.github.com and share a link back to that Gist here?

    We can’t support custom code like this, but I’ll try to at least take a quick look and see if anything is obviously wrong. You should basically be looking for the category of the specific event, and generating a different class for each category. Are you doing this?

    #983975
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Mini Calendar change colours’ is closed to new replies.