It seemed so simple and straightforward to link an author’s image to their page of previous posts like https://www.wpgarage.com/author/Rebecca/. But for some reason I couldn’t find the solution easily with the default WordPress template tags. Template tags that I had used last time I needed this functionality were deprecated.
Here’s what I did:
- First, I set up the author image using the Author Image plugin to give our client an easy way to manage thumbnails of each author from the user’s profile settings.
- Then I started looking for a way to link the author’s image to their archive. When I couldn’t find an easy answer in the WordPress template tags, I remembered that WPGarage has that feature in the footer area of each post! So I checked out the code of WPGlide theme (the theme we use on this site by Solostream), found the code I needed and modified it.Here’s the code I used:
<a href=”<?php bloginfo(‘url’); ?>/author/<?php the_author_meta(‘user_login’); ?>/”> <?php the_author_image(); ?> </a>