How to Add Author Photos to coauthors_posts_links
-
Right now, I’m listing author(s) with the following template tag:
<?php if ( function_exists( 'coauthors_posts_links' ) ) { coauthors_posts_links(); } else { the_author_posts_link(); } ?>
This outputs the author(s) of a post with their name(s) and a link to each individual’s archive of other posts on the site. Great!
For example, the meta section of a post will display:
“Post written by: Author1Name and Author2Name”However, I want to add a photo/avatar next to each name to result in something like”
“Post written by: [Author1Photo] Author1Name and [Author2Photo] Author2Name”I’ve attempted reading through the docs at https://docs.wpvip.com/technical-references/plugins/incorporate-co-authors-plus-template-tags-into-your-theme/ and have tried ‘Example #1’ at https://bekarice.com/adding-co-authors-plus-support-theme/ – but nothing I’ve tried has really worked.
One important note, I AM wishing to maintain the way that ‘coauthors_posts_links’ adds the ‘between’ and ‘betweenLast’ separators (adding in commas and/or an “and” between the names).
Any help or guidance is greatly appreciated
- The topic ‘How to Add Author Photos to coauthors_posts_links’ is closed to new replies.