Check if a specific custom field exists?
The WP get_ methods are here to retrieve data, not to display them. You can easily check the var – containing the data – before adding your head tags: $my_post_meta = get_post_meta($post->ID, ‘Company’, true); if ( ! empty ( $my_post_meta ) ) echo ‘<h4>’.$my_post_meta.'</h4>’;