Title: Coauthors Plus and Display Posts Shortcode
Last modified: August 30, 2016

---

# Coauthors Plus and Display Posts Shortcode

 *  Resolved [kendawes](https://wordpress.org/support/users/kendawes/)
 * (@kendawes)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/coauthors-plus-and-display-posts-shortcode/)
 * Great plugin!!
 * But I’m trying to get my head around getting the display-posts shortcode to be
   able to take advantage of the Coauthors Plus plugin. I don’t know how familiar
   you are with it…
 * I’ve added the “Show Author” you have at [http://www.billerickson.net/code/display-posts-shortcode-show-author/](http://www.billerickson.net/code/display-posts-shortcode-show-author/)
   and that works fine… for single authors.
 * I’ve tried replacing the
 * > get_the_author()
 *  in your code with
 * > get_coauthors()
 *  to no joy.
 * I know that even if that had worked, if the Coauthors Plus plugin was disabled,
   it wouldn’t degrade back nicely to the main author.
 * And of course because everyone wants eggs in their beer, it would be nice to 
   have the option to have the coauthor’s (or even just the author’s)name link to
   their author’s archive page…
 * I’ve been staring at this and I know it’s probably right in front of me… but 
   I must be blind as a bat!
 * [https://wordpress.org/plugins/display-posts-shortcode/](https://wordpress.org/plugins/display-posts-shortcode/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/coauthors-plus-and-display-posts-shortcode/#post-6736717)
 * Try this: [https://gist.github.com/billerickson/9d8dc3f5dfeb6ca2f487](https://gist.github.com/billerickson/9d8dc3f5dfeb6ca2f487)
 * I haven’t tested it, but it uses the coauthors_posts_link() function if that 
   function exists, and if it doesn’t it builds an author link
 *  Thread Starter [kendawes](https://wordpress.org/support/users/kendawes/)
 * (@kendawes)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/coauthors-plus-and-display-posts-shortcode/#post-6736726)
 * Hi Bill,
    Absolutely stellar!!
 * Worked perfectly after fixing two typos..
 * Line 22 – $authors should be $author
 * Line 29 – missing closing }
 * Thank you ever so much!!!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Coauthors Plus and Display Posts Shortcode’ is closed to new replies.

 * ![](https://ps.w.org/display-posts-shortcode/assets/icon-256x256.jpg?rev=2940963)
 * [Display Posts - Easy lists, grids, navigation, and more](https://wordpress.org/plugins/display-posts-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/display-posts-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/display-posts-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-posts-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-posts-shortcode/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [kendawes](https://wordpress.org/support/users/kendawes/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/coauthors-plus-and-display-posts-shortcode/#post-6736726)
 * Status: resolved