I found that the default calendar was not really helpful just having the day number in a large box, and I agree the highlighting was not that obvious. I changed the template for the calendar to show the number of games in addition to the day number.
I did this by copying the events-calendar.php template from the sportspress folder (sportspress/templates/events-calendar.php) into my theme folder. At line 223, I changed this:
if ( array_key_exists($day, $daywithpost) ) // any posts today?
$calendar_output .= '<a data-tooltip data-options="disable_for_touch:true" class="has-tip" href="' . ( sizeof( $daywithpost[ $day ] ) > 1 ? add_query_arg( array( 'post_type' => 'sp_event' ), get_day_link( $thisyear, $thismonth, $day ) ) . '" title="' . sprintf( '%s events', ( sizeof( $daywithpost[ $day ] ) ) ) : get_post_permalink( $daywithpost[ $day ][0], false, true ) . '" title="' . esc_attr( $ak_titles_for_day[ $day ] ) ) . "\">$day</a>";
else
to this:
if ( array_key_exists($day, $daywithpost) ) // any posts today?
{
$calendar_output .= $day;
$calendar_output .= '<br><a data-tooltip data-options="disable_for_touch:true" class="has-tip" href="' . ( sizeof( $daywithpost[ $day ] ) > 1 ? add_query_arg( array( 'post_type' => 'sp_event' ), get_day_link( $thisyear, $thismonth, $day ) ) . '" title="' . sprintf( '%s %s', ( sizeof( $daywithpost[ $day ] ) ), __( 'Events', 'sportspress' ) ) : get_post_permalink( $daywithpost[ $day ][0], false, true ) . '" title="' . esc_attr( $ak_titles_for_day[ $day ] ) ) . "\"><div>".sprintf( '%s %s', ( sizeof( $daywithpost[ $day ] ) ), __( 'Events', 'sportspress' ) )."</div></a>";
}
-
This reply was modified 7 years ago by _drg_.