In my author.php page, I'm wanting to create a link that sends the user to a list of all posts by that author. I thought this was a built in function of WordPress, but having trouble finding the function and its syntax.
the_author_posts_link()
seems to just link back to the author page.
<div class="outerContainer longFormContainer">
<div class="contentContainerNarrow longFormContent">
<?php
$post_author_id = get_the_author_meta('ID');
?>
<?php if( get_field('author_img', 'user_' . $post_author_id) ): ?>
<img class="alignleft" src="<?php the_field('author_img', 'user_' . $post_author_id); ?>" width="200" alt="<?php the_author(); ?>" />
<?php endif; ?>
<?php
if ( get_the_author_meta('description') ) :
echo '<p>';
echo the_author_description();
echo '</p>';
endif;
?>
<p>View all posts by <?php the_author_posts_link(); ?></p>
</div>
</div>