Using Conditionals for Custom Fields
-
I want to use a conditional on my single pages, that will display content from a custom field only if the custom field contains a value.
How would I go about this?
This is the bit of code that I have displaying the custom field:
<div class="page-top"></div> <div class="page-preview know"><h3>Did You Know?</h3> <p class="know"><?php $values = get_post_custom_values("Know"); echo $values[0]; ?></p> </div> <div class="page-bottom"></div>
I know I have to formulate some sort of if statement, but how?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Using Conditionals for Custom Fields’ is closed to new replies.