Hi there.
I don't know how to hide unused (when no value is entered) keys. Here's the code I use inside single.php:
<ul class='post-meta'>
<a>Client:</a> <?php
// this is where the custom field prints info about the Client for who the work was created
$values = get_post_custom_values("Client"); echo $values[0]; ?> |
<a>Year:</a> <?php
//this is where the custom field prints info about when the work was created
$values = get_post_custom_values("Year"); echo $values[0]; ?> |
<a>Tools:</a> <?php
//this is where the custom field prints info about how the work was created
$values = get_post_custom_values("Tools"); echo $values[0]; ?>
</ul>