I have a custom field that I'm pulling from the database using the following code:
<?php
//if custom field is present, formulate and display link from meta value
$some_var = get_post_meta($post->ID, 'some_var', true);
if ($some_var){
echo 'my html and text, and my new custom $some_var';
}
?>
That works great. Now, I'd like to add in some conditional statement that ONLY shows up if the custom field is filled out. Basically, I want to put a header around the text that $some_var will output. If it's not there, I don't want to have a piece of text floating around that means nothing. For example:
Who we are:
$who_we_are_var
What we do:
$what_we_do_var
If the who we are var is empty, I don't want the "who we are" text/html to show up. Any help out there for a non-programmer? Thanks!