Checking If Author Bio Is Blank
-
Hi There- I’m creating a WordPress theme and am trying to figure out if the author of a post’s bio is blank so that I won’t have a big blank area in my theme- it the author does have a filled in bio, I’d like to display it. On my single post files, I have this test code, but it is always reading that the author does not have a description. What am I doing wrong? Thanks.
<?php if ( empty($curauth->description) ) { echo 'This author does not have a description.'; } else { echo 'This author does have a description.'; } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Checking If Author Bio Is Blank’ is closed to new replies.