Generating author.php content when author has zero posts?
-
I have a subset of users (defined by the user capability edit_dashboard) for whom I want their email address to appear next to their name on their author.php page:
<h1><span><?php echo $curauth->display_name; if (author_can( $post->ID, 'edit_dashboard' )) { echo "(".$curauth->user_email.")"; } ?> </span></h1>
The problem I’ve run into is that it doesn’t output the email address if the user has zero posts. Is there a way to tweak that?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Generating author.php content when author has zero posts?’ is closed to new replies.