Show label for value only when value exists, basic php

This is very basic. Invest some time in a PHP tutorial. It’s fun! 🙂

Anyway …

<?php
$meta = get_post_meta( get_the_ID(), 'rw_agentPhone', TRUE );
// get_post_meta() returns an empty string if it doesn’t find anything.
// We just test for this. If the string is not empty, we print it out.
'' != $meta and print "office: $meta";
?>