Skip to content

Instantly share code, notes, and snippets.

@ckpicker
Last active December 14, 2015 21:58
Show Gist options
  • Select an option

  • Save ckpicker/5154483 to your computer and use it in GitHub Desktop.

Select an option

Save ckpicker/5154483 to your computer and use it in GitHub Desktop.
<?php if( function_exists('tribe_the_custom_fields') && tribe_get_custom_fields( get_the_ID() ) ): ?>
<?php
//Check to see if there is any value in the field before displaying
if(!empty(tribe_get_custom_field('Add a ticket link'))) { ?>
<dd class="event-meta event-meta-custom"><a href="<?php echo tribe_get_custom_field('Add a ticket link'); ?>">Ticket</a></dd>
<?php } ?>
<?php if(!empty(tribe_get_custom_field('Add a Youtube video link'))) { ?>
<dd class="event-meta event-meta-custom"><a href="<?php echo tribe_get_custom_field('Add a Youtube video link'); ?>">Youtube</a></dd>
<?php } ?>
<?php if(!empty(tribe_get_custom_field('Add a Soundcloud link'))) { ?>
<dd class="event-meta event-meta-custom"><a href="<?php echo tribe_get_custom_field('Add a Soundcloud link'); ?>">Soundcloud</a></dd>
<?php } ?>
<?php if(!empty(tribe_get_custom_field('Add any other promo link'))) { ?>
<dd class="event-meta event-meta-custom"><a href="<?php echo tribe_get_custom_field('Add any other promo link'); ?>">Promo link</a></dd>
<?php } ?>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment