Created
May 7, 2013 20:35
-
-
Save LinzardMac/5535889 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $referring_url = get_post_meta($post->ID, 'referring_url', true); | |
| $referring_url_name = get_post_meta($post->ID, 'referring_url_name', true); | |
| $downloads = get_post_meta($post->ID, 'download_location', true); | |
| $downloads_name = get_post_meta($post->ID, 'download_name', true); | |
| $contact = get_post_meta($post->ID, 'contact_name', true); | |
| $contact_url = get_post_meta($post->ID, 'contact_url', true); | |
| if(empty($referring_url) && empty($downloads) && empty($contact)){ | |
| //echo "foo!"; | |
| }else{ | |
| ?> | |
| <ul class="cta"> | |
| <?php | |
| // check if the custom field has a value | |
| if($referring_url != '') { | |
| ?> | |
| <li><a href="<?php echo $referring_url; ?>" class="button url" rel="external" title="<?php echo $referring_url; ?>"><?php echo $referring_url_name; ?></a></li> | |
| <?php } | |
| // check if the custom field has a value | |
| if($downloads != '') { | |
| ?> | |
| <li><a href="<?php echo $downloads; ?>" class="button download" rel="external" title="<?php echo $downloads; ?>"><?php echo $downloads_name; ?></a></li> | |
| <?php } | |
| // check if the custom field has a value | |
| if($contact != '') { | |
| ?> | |
| <li><a href="<?php echo $contact_url; ?>" class="button contact" rel="external" title="<?php echo $contact; ?>"><?php echo $contact; ?></a></li> | |
| <?php } | |
| } | |
| ?> | |
| </ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment