I don’t see anywhere in the settings a way to deal with the small calendar, only the full.
ie. events -> settings -> formatting -> calendar.
The eventlink there only refers to the large calendar if I am not mistaken. So the conditional placeholders would not effect the small calendar widget in any way?
I followed the documentation for custom templates and moved the calendar-small.php file to a new folder structure:
[my_theme]/plugins/events-manager/templates
.
Editing the template changes the calendar widget on my dev site, so the setup I have safely created the editable small calendar template file in my theme folder. So my question is a matter of adding a condition to the inside of the loop that shows the date in three states.
1. Plain – (the day is eventless),
2. Has and event and spaces available (this is already coded),
3 Has an event, but is fully booked. (this would be the new condition).
Desired output can be seen in this picture.
Example Image
For this condition I would like to keep the format and just add a strikethough or some other convention to show that it is booked. This way, someone could still see the event If they wanted to for some reason. SO my hope is that someone can lend some guidance for me to achieve this.
Proposed loop in pseudo-ish code from the calendar-small.php template…
//this is the original condition
<?php if( !empty($cell_data['events']) && count($cell_data['events']) > 0 ) && event_is_not_fully_booked; : ?>
<a href="<?php echo esc_url($cell_data['link']); ?>" title="<?php echo esc_attr($cell_data['link_title']) ?>"><?php echo date('j',$cell_data['date']); ?></a>
//New condition to see if event is booked
<?php elseif( !empty($cell_data['events']) && count($cell_data['events']) > 0 && $cell_data['is_fully_booked'] ) :?><br />
//a linked day with a strike through ior some alternate styling
//End New condition
<?php else:?><br />
//eventless date, also original to the calendar loop
<?php echo date('j',$cell_data['date']); ?><br />
<?php endif; ?><br />
Perhaps this data is not even on the model yet, and this can’t be done? I am familiar enough with php to get most things done, but this one is a noodle scratcher. Thank you to those that have replied so far, you got me this far. Thanks in advance to anyone else who may have some insight. Maybe I am just over thinking this?