Hello, I have a set of custom fields which are not always populated. I need to display them if populated and either display nothing or display a message if they are not.
This is the code to display the fields on the page.
<h6><span>By: </span><?php yyy_authors(); ?>. <span>Updated on:</span> <?php yyy_date_updated(); ?>. <span>Document type:</span> <?php the_field('document_type'); ?></h6>
So for the sake of figuring this out I'd like it to display the word 'unkown' if any of the fields are empty.
I know I need to be using an if / else but not sure how so can anyone please point me in the direction?