Replace text with Category (if else)
-
I have a custom field that the client can or cannot fill in, if they don’t fill it in i want to replace it with the post’s category.
I have this code below to insert the custom field, now i just need an else statement after it to insert category if the $painter field IS blank.
<?php // Show artist if we have one if ($painter != "") { echo '<h3>' . $painter . '</h3>'; } ?>
Any ideas?
Thanks!
- The topic ‘Replace text with Category (if else)’ is closed to new replies.