Can anyone tell me how differentiate all the subcategories for root Events category using different color text for each category in Calendar view?
Any help would be appreciated.
Thanks in advance.
Arpita
Can anyone tell me how differentiate all the subcategories for root Events category using different color text for each category in Calendar view?
Any help would be appreciated.
Thanks in advance.
Arpita
Amazing Event Calendar Plugin.
Would love to know how to change the coloring for each category.
I'm aware the #tec-content in events.css is customizable, but would love to assign different colors for each sub-event category.
do you want same as below link? If yes, then I can give you instructions.
I have solved this problem already.
http://professionalplanner.com.au/?cat=949&eventDate=2010-11&eventDisplay=month
yes, that would be great! was this done in your events.css?
Just following up. Would you be able to to provide instructions to solve this? I'd be greatly appreciative. Thank you!
I'm interested in this exact issue as well. Did you post the answer somewhere?
Thanks!
I will post the answer by end of this week for sure.
I am running busy somewhat that's why not able to post it, but will do it by end of this week.
Cheers,
Arpita
Great! Thank you Arpita!
Thanks arpitap! Look forward to it.
I made changes in display_day function which is in table.php file.
the file is under views folder in the plugin.
at line 120:
in place of
<div id='event_<?php echo $eventId; ?>' class="tec-event
<?php
foreach((get_the_category()) as $category) {
echo 'cat_' . $category->cat_nickname . ' '; //Arpita
}
?>
">
I replaced it with :
<div id='event_<?php echo $eventId; ?>' class="tec-event
<?php
foreach((get_the_category()) as $category) {
echo 'cat_' . $category->cat_name . ' ';
}
?>
">
<?php
foreach((get_the_category()) as $category) {
if($category->cat_name == 'Professional Planner Events')
{
?>
" style="color:#990066;"><?php the_title(); ?>
<? }
else if($category->cat_name == 'Media Partner Events')
{
?>
" style="color:#0099CC;"><?php the_title(); ?>
<? }
else if($category->cat_name == 'Industry Events')
{
?>
" style="color:#339933;"><?php the_title(); ?>
<? }
else if($category->cat_name == 'Webinars Events')
{
?>
" style="color:#CC0000;"><?php the_title(); ?>
<? }
}
?>
basically what it is doing is getting sub category name and based on that subcategory, it will display different color title.
I don't think this is proper way to do it but still it is working fine for me.
Let me know if you need anymore help in this from me.
Arpita
Thank Arpita. Looks great. The only issue I have is that the code is duplicating my event entry. I only want my "Away-Games" to be a different color.
Here's my code:
<div id='event_<?php echo $eventId; ?>' class="tec-event
<?php
foreach((get_the_category()) as $category) {
if($category->cat_name == 'Away-Game')
{
?>
" style="color:#999999;"><?php the_title(); ?>
<? }
}
?>
**Any feedback would be great!**
Thanks arpitap! This did the trick! Much appreciated!!!
I have four categories under Events
Theatre, Music, Art, Dance
But when I use the code it shows the --- " style="color:#123456;"> in addition to properly changing the color
Am I missing something?
Here is the code I used based on @arpitap. Hopefully this helps you.
<div id='event_<?php echo $eventId; ?>' class="tec-event
<?php
foreach((get_the_category()) as $category) {
echo 'cat_' . $category->cat_name . ' ';
}
?>
">
<?php
foreach((get_the_category()) as $category) {
if($category->cat_name == 'Academic Events')
{
?>
<a href="<?php the_permalink(); ?>" style="color:#ff0000;"><?php the_title(); ?></a>
<? }
else if($category->cat_name == 'Art Events')
{
?>
<a href="<?php the_permalink(); ?>" style="color:#00cc1f;"><?php the_title(); ?></a>
<? }
else if($category->cat_name == 'Athletic Events')
{
?>
<a href="<?php the_permalink(); ?>" style="color:#ffaa00;"><?php the_title(); ?></a>
<? }
else if($category->cat_name == 'Corporate Events')
{
?>
<a href="<?php the_permalink(); ?>" style="color:#1100ff;"><?php the_title(); ?></a>
<? }
else if($category->cat_name == 'Alumni Events')
{
?>
<a href="<?php the_permalink(); ?>" style="color:#ea00ff;"><?php the_title(); ?></a>
<? }
}
?>
<div id='tooltip_<?php echo $eventId; ?>' class="tec-tooltip" style="display:none;">Thanks,
I'll give it a shot.
Have you had a problem with event list?
No. you?
I have a problem with the event list and the comments section
My theme has sidebar on left
also have pro and pro beta version updates
lost google rank when went pro, created new directory that 111 performing arts groups linked to
Thanks,
It's working well.
I'm confused by some double lines
if you're speaking of the double lines appearing at the top of dates 15-19 of Nov, it appears you have events trying to appear that aren't. I'm a noob coder, but from what I see, for example, Nov 16, "N.C. Museum of Art's Fall Film Series" and "November Events at the N.C. Museum of History" are in the code and trying to appear, but coming up blank. The border is still appearing. Other than that, not a good person to ask.
I guess I need to add museums
thanks for all the help
This topic has been closed to new replies.