My wordpress theme uses an in-built function to exhibit author bio and articles compiled by the writer.

This is actually the code:

function add_author_box($content) {

    // make globals and reset query first
    wp_reset_query();

    $display = new WP_query();
    $display->query(array('showposts' => 3, 'author' => get_the_author_meta('ID'), 'orderby' => 'rand' ));
    global $wp_query; $wp_query->in_the_loop = true;
    if ($display->have_posts()) :

    // display (if results)
    $author_box = '';
    $author_box .= '<div class="post-author">';
    $author_box .= '<div class="post-author-box">';
    $author_box .= '<div class="post-author-img">'.get_avatar(get_the_author_meta('user_email'), $size = '32').'</div>';
    $author_box .= '<div class="post-author-info"><span class="edited">'.__('Article by','news').'</span><span class="editor"><a href="'. get_author_link(false, get_the_author_meta('ID')).'">'.get_the_author_meta('display_name').'</a></span></div><div class="clear"></div>';
    $author_box .= '</div>';
    $author_box .= '<ul>';
    $author_box .= '<li class="read-also">'.__('Also Wrote','news').'</li>';
    while ($display->have_posts()) : $display->the_post();
    $author_box .= '<li><a href="'.get_permalink($post->ID).'">'.dt_get_posttype().get_the_title().'</a></li>';
    endwhile;
    wp_reset_query();
    $author_box .= '</ul>';
    $author_box .= '</div>';
    $content = $author_box.$content;
    return $content;

    endif;

}

What Let me do would be to display the writer box only when the consumer has completed the description. In another Wordpress theme, this code labored fine when put into single.php.

<!-- #Testing Author Bio -->
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries  ?>
                    <div class="postauthor">
                        <div id="author-avatar">
                        <img src="<?php bloginfo('template_directory') ?>/images/authors/<?php the_author_ID()?>.jpg" alt="<?php the_author(); ?>" title="<?php the_author(); ?>" />

                        </div><!-- #author-avatar -->
                        <div id="author-description">
                            <h3><?php printf( esc_attr__( 'About %s', 'twentyten' ), get_the_author() ); ?></h3>
                            <?php the_author_meta( 'description' ); ?>
                            <div id="author-link">
                                <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
                                    <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten' ), get_the_author() ); ?>
                                </a>
                            </div><!-- #author-link -->
                        </div><!-- #author-description -->
                    </div><!-- #entry-author-info -->
<!-- #Testing Author Bio -->

Can someone let me know how you can integrate the circumstances above in to the built-in functions?