Skip to content

Instantly share code, notes, and snippets.

@jamiemitchell
Forked from ninnypants/secondary-contact.php
Created October 16, 2013 05:00
Show Gist options
  • Select an option

  • Save jamiemitchell/7002852 to your computer and use it in GitHub Desktop.

Select an option

Save jamiemitchell/7002852 to your computer and use it in GitHub Desktop.
<?php
$contact_name = get_post_meta(get_the_ID(), 'secondary-contact-name', true);
if(!empty($contact_name)):
?>
<dt>Secondary contact</dt>
<dd><?php echo apply_filters('the_content', $contact_name); ?></dd>
<dd><?php echo apply_filters('the_content', get_post_meta(get_the_ID(), 'secondary-contact-phone', true)); ?></dd>
<dd><?php echo apply_filters('the_content', get_post_meta(get_the_ID(), 'secondary-contact-extension', true)); ?></dd>
<dd><?php echo apply_filters('the_content', get_post_meta(get_the_ID(), 'secondary-contact-email', true)); ?></dd>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment