
If you’re going to be displaying a featured image in your event list widget in Events Calendar Pro, chances are that you won’t want to show the list date next to it.
In my last post, I showed you how to specify the event featured image size for the list widget (and also the single event page) in Events Calendar Pro. If you follow that tutorial (without going on to the tutorials about displaying the events in a horizontal row instead of a single column), you’ll get something that looks like the image above: day of the week and day of the month in one div, and featured image and event details in a div next to it.
To fix this problem, you’re going to need to add another file to the tribe-events folder in your theme directory.
Open the /plugins/events-calendar-pro/src/views/pro/widgets/modules
folder and open the single-event.php
file. Save it to /themes/your-theme/tribe-events/pro/widgets/modules/
. (You will need to create the /modules/
folder if it doesn’t exist yet. If this is the first of the tutorials you are following, you’ll also need to create the tribe-events
, pro
, and widgets
folders within your theme folder.)
Find the lines that say
<div class="tribe-mini-calendar-event event-<?php esc_attr_e( $mini_cal_event_atts['current_post'] ); ?> <?php esc_attr_e( $mini_cal_event_atts['class'] ); ?>"> <div class="list-date"> <span class="list-dayname"><?php echo apply_filters( 'tribe-mini_helper_tribe_events_ajax_list_dayname', date_i18n( 'D', $postDate ), $postDate, $mini_cal_event_atts['class'] ); ?></span> <span class="list-daynumber"><?php echo apply_filters( 'tribe-mini_helper_tribe_events_ajax_list_daynumber', date_i18n( 'd', $postDate ), $postDate, $mini_cal_event_atts['class'] ); ?></span> </div>
Delete or comment out the entire “list-date” div, like this:
<div class="tribe-mini-calendar-event event-<?php esc_attr_e( $mini_cal_event_atts['current_post'] ); ?> <?php esc_attr_e( $mini_cal_event_atts['class'] ); ?>"> <!-- <div class="list-date"> <span class="list-dayname"><?php echo apply_filters( 'tribe-mini_helper_tribe_events_ajax_list_dayname', date_i18n( 'D', $postDate ), $postDate, $mini_cal_event_atts['class'] ); ?></span> <span class="list-daynumber"><?php echo apply_filters( 'tribe-mini_helper_tribe_events_ajax_list_daynumber', date_i18n( 'd', $postDate ), $postDate, $mini_cal_event_atts['class'] ); ?></span> </div> -->
Save the file and upload it to your server. Your folder structure should look like this, with your own theme folder in the place of “flex”.
And your list widget should now look like this, with the featured image showing but not the list date box.
It’s a lot of subfolders, but otherwise a simple modification.
Leave a Reply