Knowledgebase

Check the knowledge base articles to get a jump start on your integrations, modifications, and all around user questions. If you don’t find what you’re looking for hit the help desk.

Search Knowledgebase

Make phone numbers into callable links

You know that handy little feature where you tap or click on a phone number and it initiates a phone call on your device? Well, it’s possible to set this up for the venue and organizer phone numbers that display on single event pages.

In both cases you will need to perform a template override by copying both of the following files to your theme:

plugins/the-events-calendar/src/views/modules/meta/organizer.php

plugins/the-events-calendar/src/views/modules/meta/venue.php

As a reminder – though this is explained in more detail within the template override – once setup within your theme your copies should live at paths looking something like this:

themes/YOUR_THEME/tribe-events/modules/meta/organizer.php

themes/YOUR_THEME/tribe-events/modules/meta/venue.php

In both templates you should look for some code like this:

<?php echo esc_html( $phone ); ?>

All that needs to happen is you change the above to this:

<a href="tel:<?php echo esc_attr( $phone ) ?>"><?php echo esc_html( $phone ) ?></a>

Remember that, generally speaking, this should remain “wrapped” up in dd.tel tags, so your final adjustment ought to take this sort of shape:

<dd class="tel">
<a href="tel:<?php echo esc_attr( $phone ) ?>"><?php echo esc_html( $phone ) ?></a>
</dd>

That’s it — good luck!