We have a feature in Events Calendar Pro called additional fields, which allows customers to include fields into their Events to allow more information to be added to the Events.

Our goal here is to create three custom fields using Events Calendar Pro, and make extra templates that display those fields after the event description in the tooltip for month view.

Month View tooltip
Month view tooltip

Following the same pattern we used in “How to Include a New Template in a View” you will create a new file in your child theme at this location:[your-theme]/tribe/events/v2/month/tooltip-extra-fields.php: 

<?php
// Get the event ID.
$event_id = get_the_ID();

// Fetch from this Event all custom fields and their values.
$fields = tribe_get_custom_fields( $event_id );
?>

<div class="theme-extra-event-fields">
<?php if ( ! empty( $fields['Artist'] ) ) : ?>
  <h4>Artist</h4>
  <p>
    <?php if ( ! empty( $fields['Artist Instagram'] ) ) : ?>
    <a href="<?php echo esc_url( $fields['Artist Instagram'] ); ?>" target="_blank">
      <?php endif; ?>
      <?php echo esc_html( $fields['Artist'] ); ?>
      <?php if ( ! empty( $fields['Artist Instagram'] ) ) : ?>
    </a>
    <?php endif; ?>
  </p>
<?php endif; ?>
<?php if ( ! empty( $fields['VIP Confirmed'] ) ) : ?>
  <?php $vips = explode( ',', $fields['VIP Confirmed'] ); ?>
  <h4>VIPs confirmed</h4>
  <ul>
  <?php foreach ( $vips as $vip ) : ?>
    <li><?php echo esc_html( $vip ); ?></li>
  <?php endforeach; ?>
  </ul>
<?php endif; ?>
</div>

The template above will make the appropriate checks to display the Artist Name and, if an Instagram URL was included, make that into a link, as well as creating a list of the VIPs confirmed for the event.

Now you will need to include this new template to show after the tooltip for the month view, using the following code in your functions.php file:

<?php 
add_action( 'tribe_template_after_include:events/v2/month/calendar-body/day/calendar-events/calendar-event/tooltip/description',
  function ( $file, $name, $template ) {
    $template->template( 'month/tooltip-extra-fields' );
  }, 
10, 
3 
);

Starting with version 5.0 of The Events Calendar’s views, any non-default elements that you add will be unstyled, allowing you full freedom to customize their display without worrying about style conflicts.

To style these newly added elements, we will need to include a couple of CSS rules into the styles.css file–or any CSS file that will be included on an Events page–in our theme.

.tooltipster-base.tribe-events-tooltip-theme .theme-extra-event-fields {
  font-size: 13px;
}

.tooltipster-base.tribe-events-tooltip-theme .theme-extra-event-fields h4 {
  font-size: 15px;
  margin-bottom: 10px;
  margin-top: 10px;
  font-weight: bold;
}

.tooltipster-base.tribe-events-tooltip-theme .theme-extra-event-fields a {
  color: rgb(17, 85, 204);
  font-weight: bold;
}

.tooltipster-base.tribe-events-tooltip-theme .theme-extra-event-fields ul {
  list-style: disc;
}

.tooltipster-base.tribe-events-tooltip-theme .theme-extra-event-fields ul li {
  margin-left: 16px;
}

When the steps above are complete, and you have an event with the correct fields you should be able to see the information on the tooltip.

For this example, we made use of the additional fields from Events Calendar Pro, but you can modify the [your-theme]/tribe/events/v2/month/tooltip-extra-fields.php template to include any kind of customization that you wish.