Missing Author Information

I am having trouble displaying the author name and avatar on my single.php page. The posts load fine and all the correct information is available. However the avatar and name is no where to be found. I’m not sure what I’m doing wrong. Help is appreciated

<div class=”row”>
<h1 class=”primary-color”> <?php the_title(); ?></h1>
<span class=”avatar”>
<?php echo get_avatar( $id_or_email, 30, $default, $alt, $args ); ?>
by <span class=”primary-color”><?php echo get_the_author_meta(‘display_name’, $author_id); ?></span> <span class=”pipe”>|</span> <span class=”date”><?php echo get_the_date(); ?></span>
</div><!– END ROW –>

<div class=”row”>
while ( have_posts() ) : the_post();

<?php the_content(); ?>

<?php endwhile; ?>

Read more here:: Missing Author Information

Leave a Reply

Your email address will not be published. Required fields are marked *