Category colors showing on legend but not in calendar
-
Hi
I have the latest version of events calendar and events calendar pro, I’ve installed this plugin and set everything up, on the legend I get all the colours showing, in the calendar view the events are the standard colour and do not change.If I hover over an event the title of the event has a box behind which is the correct color.
any help would be appreciated.
https://www.ads-software.com/plugins/the-events-calendar-category-colors/
-
You will need to ignore categories that you don’t need colored. You can only have one color per event. Please refer to https://github.com/afragen/the-events-calendar-category-colors/wiki/Ignoring-One-or-More-Categories
Hi
I have 5 categories, I’ve added one entry to the calendar which is under one of the categories but the color doesnt work on it.
please advisethanks
Without being able to see the site you’re referring to I have limited ability to assist.
Hi I’ve uploaded a link here: https://clienthome.co.uk/sports/events/
the entries are all red which is the default theme color.
Any help will be apprecaited
thanks
Are you using a custom template? If so, you’ve forgotten to add back the code that inserts the category classes.
Hi Andy
Im just using a standard theme, although the theme has some custom event calendar support, where can i find information about this? is this simple to fix?thanks again
You probably have to ask whomever did the events customizations. It should be as simple as adding the function that adds the category classes back into the correct spot. Your designer should be able to discern this by comparing the default template to the changed template.
thanks will speak with the theme author.
hi
I spoke with the author, he advised it was only css customisation changes that were made, and there are a few functions in the functions file which i’ve listed below. can you advise as to what i need to do to get this working?/* Tribe Events Calendar support * * */ /* Get heading of Tribe Events page * * Return : array[2]{heading,sub-heading} if found, false if not found * check https://gist.github.com/jo-snips/2415009 * */ function get_tribe_events_page_heading(){ if(class_exists('TribeEvents') && is_tribe_page()){ if(((tribe_is_event() || get_post_type() == 'tribe_organizer') && is_single()) || tribe_is_venue()){ // Single Eveng $heading = get_the_title(get_the_ID()); } else { // List View $heading = tribe_get_events_title(); } if(is_single()){ $sub_heading = '<a href="'.tribe_get_events_link().'">? ' . __('All Events','cactusthemes') . '</a>'; } return array($heading,$sub_heading); } else return false; } /* Check if current page is a tribe page (listing, single ...) */ function is_tribe_page(){ wp_reset_postdata();//reset custom query if(class_exists('TribeEvents')){ if( tribe_is_month() && !is_tax() ) { // Month View Page return true; } elseif( tribe_is_month() && is_tax() ) { // Month View Category Page return true; } elseif( tribe_is_past() || tribe_is_upcoming() && !is_tax() ) { // List View Page return true; } elseif( tribe_is_past() || tribe_is_upcoming() && is_tax() ) { // List View Category Page return true; } elseif( tribe_is_event() && is_single() ) { // Single Events return true; } elseif(class_exists('TribeEventsPro')){ if( tribe_is_week() && !is_tax() ) { // Week View Page return true; } elseif( tribe_is_week() && is_tax() ) { // Week View Category Page return true; } elseif( tribe_is_day() && !is_tax() ) { // Day View Page return true; } elseif( tribe_is_day() && is_tax() ) { // Day View Category Page return true; } elseif( tribe_is_map() && !is_tax() ) { // Map View Page return true; } elseif( tribe_is_map() && is_tax() ) { // Map View Category Page return true; } elseif( tribe_is_photo() && !is_tax() ) { // Photo View Page return true; } elseif( tribe_is_photo() && is_tax() ) { // Photo View Category Page return true; } elseif( get_post_type() == 'tribe_organizer' && is_single() ) { // Single Organizers return true; } elseif( tribe_is_venue() ) { // Single Venues return true; } } } return false; } function tribe_single_related_events_fix($count = 3, $post_type = TribeEvents::POSTTYPE ) { if(function_exists('tribe_get_related_posts')){ $count = ot_get_option( 'number_re_event'); if($count==''){$count=3;} $posts = tribe_get_related_posts( $count); if ( is_array( $posts ) && !empty( $posts ) ) { echo '<div>'.do_shortcode('[divider colorstyle="colorstyle_2" dividerstyle="style_2" paddingtop="40" paddingbottom="10" animation="" ]').'</div>'; echo '<h3 class="tribe-events-related-events-title">'. __( 'Related Events', 'tribe-events-calendar-pro' ) .'</h3>'; echo '<ul class="tribe-related-events tribe-clearfix hfeed vcalendar">'; foreach ( $posts as $post ) { echo ' <li>'; $thumb = ( has_post_thumbnail( $post->ID ) ) ? get_the_post_thumbnail( $post->ID, 'thumb_100x100' ) : '<img src="'. trailingslashit( TribeEventsPro::instance()->pluginUrl ) . 'resources/images/tribe-related-events-placeholder.png" alt="'. get_the_title( $post->ID ) .'" />';; echo '<div class="tribe-related-events-thumbnail">'; echo '<a>ID ) .'" class="url" rel="bookmark">'. $thumb .'</a>'; echo '</div>'; echo '<div class="tribe-related-event-info">'; echo '<h3 class="tribe-related-events-title summary"><a>ID ) .'" class="url" rel="bookmark">'. get_the_title( $post->ID ) .'</a></h3>'; if ( class_exists( 'TribeEvents' ) && $post->post_type == TribeEvents::POSTTYPE && function_exists( 'tribe_events_event_schedule_details' ) ) { echo tribe_events_event_schedule_details( $post ); } if ( class_exists( 'TribeEvents' ) && $post->post_type == TribeEvents::POSTTYPE && function_exists( 'tribe_events_event_recurring_info_tooltip' ) ) { echo tribe_events_event_recurring_info_tooltip( $post->ID ); } echo '</div>'; echo '</li> '; } echo ''; echo '<div>'.do_shortcode('[divider colorstyle="colorstyle_2" dividerstyle="style_1" paddingtop="" paddingbottom="" animation="" ]').'</div>'; } } } function gp_is_plugin_active( $plugin ) { return in_array( $plugin, (array) get_option( 'active_plugins', array() ) ); } function gp_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'gp_excerpt_more'); function tribe_events_single_event_meta_fix() { $event_id = get_the_ID(); $skeleton_mode = apply_filters( 'tribe_events_single_event_the_meta_skeleton', false, $event_id ) ; $group_venue = apply_filters( 'tribe_events_single_event_the_meta_group_venue', false, $event_id ); $html = ''; if ( $skeleton_mode ) { // show all visible meta_groups in skeleton view $html .= tribe_get_the_event_meta(); } else { $html .= '<div class="dotted"></div><div class="tribe-events-single-section tribe-events-event-meta tribe-clearfix">'; // Event Details $html .= tribe_get_meta_group( 'tribe_event_details' ); // When there is no map show the venue info up top if ( ! $group_venue && ! tribe_embed_google_map( $event_id ) ) { // Venue Details $html .= tribe_get_meta_group( 'tribe_event_venue' ); $group_venue = false; } else if ( ! $group_venue && ! tribe_has_organizer( $event_id ) && tribe_address_exists( $event_id ) && tribe_embed_google_map( $event_id ) ) { $html .= sprintf( '%s<div class="tribe-events-meta-group tribe-events-meta-group-gmap">%s</div>', tribe_get_meta_group( 'tribe_event_venue' ), tribe_get_meta( 'tribe_venue_map' ) ); $group_venue = false; } else { $group_venue = true; } // Organizer Details if ( tribe_has_organizer( $event_id ) ) { $html .= tribe_get_meta_group( 'tribe_event_organizer' ); } $html .= apply_filters( 'tribe_events_single_event_the_meta_addon', '', $event_id ); $html .= '</div>'; } if ( ! $skeleton_mode && $group_venue ) { // If there's a venue map and custom fields or organizer, show venue details in this seperate section $venue_details = tribe_get_meta_group( 'tribe_event_venue' ) . tribe_get_meta( 'tribe_venue_map' ); if ( !empty($venue_details) ) { $html .= apply_filters( 'tribe_events_single_event_the_meta_venue_row', sprintf( '<div class="dotted"></div><div class="tribe-events-single-section tribe-events-event-meta tribe-clearfix">%s</div>', $venue_details ) ); } } return apply_filters( 'tribe_events_single_event_meta', $html ); } function pp_buttom($subscribe_bt,$b) { if($subscribe_bt=='pp_buynow'){ echo '<a href="'.$b.'"><img alt="'. __('Buy Now Button', 'cactusthemes').'" class="button_pp" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" /></a>'; }else if($subscribe_bt=='pp_subscribe'){ echo '<a href="'.$b.'"><img alt="'. __('Subscribe Button', 'cactusthemes').'" class="button_pp" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_LG.gif" /></a>'; }else if($subscribe_bt=='pp_donate'){ echo '<a href="'.$b.'"><img alt="'. __('Donate Button', 'cactusthemes').'" class="button_pp" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" /></a>'; }else if($subscribe_bt=='pp_addtocart'){ echo '<a href="'.$b.'"><img alt="'. __('Add to cart Button', 'cactusthemes').'" class="button_pp" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" /></a>'; }else if($subscribe_bt=='pp_buygift'){ echo '<a href="'.$b.'"><img alt="'. __('Buy gift Button', 'cactusthemes').'" class="button_pp buygift" src="https://www.paypalobjects.com/en_US/i/btn/btn_gift_LG.gif" /></a>'; } }
any advice appreciated
thanks in advance
Can you tell me where, precisely, this code is located? If possible can you put it up on a github gist to make it easier to view and potentially have a PR?
Hi
That code was in the functions.php file.
I’ve added the code here:
https://gist.github.com/anonymous/1c513542126bd51f6e61
thanks.
In looking at s code, what’s calling it? There’s only one add_filter call that returns a blank.
I’m missing something.
Hi Andy
This is the full functions file
https://gist.github.com/anonymous/880330cd1b280e5fdef3
there are also some tribe events files in the tribe-events folder,
there are here: https://www.dropbox.com/s/tavr0dyng6tjehr/tribe-events.zip?dl=0
your help is really appreciated, its been driving me crazy. ??
I should have some time this weekend to take a better look at it all.
thank you for letting me know ??
Appreciated.
- The topic ‘Category colors showing on legend but not in calendar’ is closed to new replies.