If function returns value…
I was recently building an author template and wanted to implement a function such as :
<?php the_author_meta( 'description' ); ?>
RIght now if the description is empty, it won’t display anything. This is fine, however, if I wanted to wrap that meta information like so:
<div><?php the_author_meta( 'description' ); ?></div>
How can I make something like this work? I want to not return any information if the description isn’t filled out. But if it is, I’d like to wrap something like a div around it.
Is there some global way of doing something like this that I can use for other functions?
- The topic ‘If function returns value…’ is closed to new replies.