Title: [Plugin: Co-Authors Plus] Displaying Multiple Authors?
Last modified: August 19, 2016

---

# [Plugin: Co-Authors Plus] Displaying Multiple Authors?

 *  [pac10dave](https://wordpress.org/support/users/pac10dave/)
 * (@pac10dave)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-co-authors-plus-displaying-multiple-authors/)
 * Even if I add another author, the post still displays as:
 * TITLE
    by Author 1
 * And Author 2 appears to be hidden. On posts that I collaborate with another Author,
   I’d like it to read:
 * TITLE
    by Author 1 and Author 2
 * Is this possible? I’m code illiterate so please be as detailed as possible. Thank
   you!!

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

 *  Thread Starter [pac10dave](https://wordpress.org/support/users/pac10dave/)
 * (@pac10dave)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-co-authors-plus-displaying-multiple-authors/#post-1125581)
 * Anyone? Thanks in advance!
 *  [Mohammad Jangda](https://wordpress.org/support/users/batmoo/)
 * (@batmoo)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-co-authors-plus-displaying-multiple-authors/#post-1125652)
 * Did you add the coauthor() tag to your template files? For example, you need 
   to replace the `the_author();` with `coauthors();`
 *  [pints1ze](https://wordpress.org/support/users/pints1ze/)
 * (@pints1ze)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/plugin-co-authors-plus-displaying-multiple-authors/#post-1125821)
 * I just recently ran into this problem, but didn’t want to find every occurance
   of the_author() in my theme. I put together a filter that hooks into the_author()
   in my themes functions.php file that did the trick… It could probably be cleaned
   up quite a bit, but hopefully it helps:
 *     ```
       function use_coauthors() {
       	$authors = get_coauthors();
       	$numauthors = count($authors);
       	$result = '';
       	foreach($authors as $author){
       		$result .= $author->display_name;
       		if ($numauthors > 2) {
       			$result .= ', ';
       		} elseif ($numauthors == 2) {
       			$result .= ' and ';
       		} else {
       			$result .= '';
       		}
       		$numauthors--;
       	}
       	return $result;
       }
       if ( function_exists('get_coauthors') )
       	add_filter('the_author','use_coauthors');
       ```
   
 *  [Mohammad Jangda](https://wordpress.org/support/users/batmoo/)
 * (@batmoo)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/plugin-co-authors-plus-displaying-multiple-authors/#post-1125822)
 * pints1ze: that is awesome!
 * I didn’t know there was a filter for the_author! Would you mind if I add your
   code into the plugin? I’ll credit you of course 🙂
 *  [ebhpf](https://wordpress.org/support/users/ebhpf/)
 * (@ebhpf)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/plugin-co-authors-plus-displaying-multiple-authors/#post-1125827)
 * Hi! First off thanks for enhancing this plugin it sounds like I am needing however
   I am having troubles implementing the plugin with my K2 theme template. I have
   added the above code:
 * function use_coauthors() {
    $authors = get_coauthors(); $numauthors = count($
   authors); $result = ”; foreach($authors as $author){ $result .= $author->display_name;
   if ($numauthors > 2) { $result .= ‘, ‘; } elseif ($numauthors == 2) { $result.
   = ‘ and ‘; } else { $result .= ”; } $numauthors–; } return $result; } if ( function_exists(‘
   get_coauthors’) ) add_filter(‘the_author’,’use_coauthors’);
 * and also replaced all my the_author with coauthors, yet it still does not seem
   to appear on my blog.
 * Any help would be greatly appreciated.
 * Thanks so much in advance!

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

The topic ‘[Plugin: Co-Authors Plus] Displaying Multiple Authors?’ is closed to 
new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 4 participants
 * Last reply from: [ebhpf](https://wordpress.org/support/users/ebhpf/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/plugin-co-authors-plus-displaying-multiple-authors/#post-1125827)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
