Home › Forums › Calendar Products › Events Calendar PRO › Mini Calendar change colours
- This topic has 5 replies, 4 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
April 2, 2015 at 1:54 am #952715
handdrawnpixels
ParticipantHello –
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 greenI 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
April 3, 2015 at 5:22 pm #953216George
ParticipantHey @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,
GeorgeApril 5, 2015 at 5:53 pm #953366Andy Fragen
ModeratorYou might give The Events Calendar Category Colors a try.
It is a third party plugin. It does colorize widgets too.
April 6, 2015 at 2:26 pm #953543handdrawnpixels
ParticipantI 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?
April 6, 2015 at 2:58 pm #953553George
ParticipantHey @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?
July 7, 2015 at 6:31 am #983975Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Mini Calendar change colours’ is closed to new replies.
