Title: If function returns value&#8230;
Last modified: August 19, 2016

---

# If function returns value…

 *  [anthonyb](https://wordpress.org/support/users/anthonyb/)
 * (@anthonyb)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/if-function-has-data/)
 * Hey there,
 * 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?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/if-function-has-data/#post-1897336)
 *     ```
       <?php if( get_the_author_meta('description') :?>
       <div><?php the_author_meta( 'description' ); ?></div>
       <?php endif;?>
       ```
   
 * [http://codex.wordpress.org/Function_Reference/the_author_meta](http://codex.wordpress.org/Function_Reference/the_author_meta)
 *  Thread Starter [anthonyb](https://wordpress.org/support/users/anthonyb/)
 * (@anthonyb)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/if-function-has-data/#post-1897346)
 * Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘If function returns value…’ is closed to new replies.

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [true](https://wordpress.org/support/topic-tag/true/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [anthonyb](https://wordpress.org/support/users/anthonyb/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/if-function-has-data/#post-1897346)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
