As we developed our EveryMundo blog, we encountered two issues: how to give credit where credit is due, and how to avoid duplicate content for SEO purposes. Once we installed our WordPress theme, we found out that it did not support multiple authors; it only allowed one author for each post. We tend to work collaboratively on most projects here, including our blog posts–this particular article being an ironic exception.

Seeking to resolve this issue, our first attempt at crediting all collaborating authors was to include their bios in the body of the post under a subheading, “About the Authors”. However, when a past author posted again, they generated duplicate content just by adding their bio.

The answer, we thought, was a plugin. However, upon installing the Co-Authors Plus plugin, we found that it was incompatible with our WordPress theme (Logger). Determined to solve this SEO problem, we developed a function to avoid duplicate content with multiple authors. Here are the steps we followed:

  1. Install – Co-authors Plus plugin
  2. Add this code to the bottom of functions.php :
    function be_post_authors_post_link_shortcode( $atts ) {
        $atts = shortcode_atts( array(
          'between'      => null,
          'between_last' => null,
          'before'       => null,
          'after'        => null
        ), $atts );
        $authors = function_exists( 'coauthors_posts_links' ) ? coauthors_posts_links( $atts['between'], $atts['between_last'], $atts['before'], $atts['after'], false ) :     $atts['before'] . get_author_posts_url() . $atts['after'];
        return $authors;
    add_shortcode( 'post_authors_post_link', 'be_post_authors_post_link_shortcode' );
  3. Add this shortcode anywhere on your post, which will render the authors names separated by an ‘and’. Every name should link to the corresponding author biography page:
  4. Under the article post, find the Authors box, which is part of the Co-authors Plus plugin, and add all authors that are involved with this
  5. Under Users, add any authors and give them the role of author, with the corresponding biography summary and photo of the author. Note: This is needed for the author to show up in the Co-authors Plus plugin.
  6. To show authors and their bios in the sidebar, install this widget: Author Spotlight (Widget), and include it in the sidebar widget area.

Find an example of one of our articles using this multiple authors function here.

This solution should work for just about any WordPress theme. If anyone encounters issues with their particular theme and the methods portrayed above, please leave us a comment below.

By: [post_authors_post_link]