The Events Calendar plugin – Adding City & State to the widget

The Events Calendar plugin widget only shows two things, the event title and the duration (date/time). For my purposes, I needed to show the city & state as well. Here’s how to do it:

1. Make a new folder in your WordPress theme called tribe-events
2. Make a sub folder within that called widgets
3. Make a file called list-widget.php
4. Copy & paste the list-widget.php data from the plugin file of the same name.
5. Add the following code over the existing duration div

<div class="duration">
<?php echo tribe_get_city(); ?>, <?php echo tribe_get_state(); ?>
<br>
<?php echo tribe_events_event_schedule_details(); ?>
</div>

Cheers!

UPDATE 2/23/17
<div class="duration">
<?php echo tribe_events_event_schedule_details(); ?>
<br>
<?php echo tribe_get_city(); ?>, <?php echo tribe_get_state(); ?>
</div>

Leave a Reply

Your email address will not be published. Required fields are marked *