WordPress is_multi_author() Function

Beginner
4 min read
Updated: Nov 2026
3 examples
Conditional tag

Definition

In WordPress, is_multi_author() returns true when more than one user has published a post on the site. If only one person writes posts, it returns false.

Themes use it to hide the author name on a one-author blog, and to show it on a team blog.

Syntax

Use it as the test of an if statement.

WordPress
if ( is_multi_author() ) {
  // code for the true path
} else {
  // code for the false path
}
CallWhat it does
is_multi_author()True if two or more authors have published posts.
! is_multi_author()True on a one-author site.
the_author()Prints the author name inside the loop.

WordPress saves the result for a short time, so the check is fast.

Full declaration
WordPress
is_multi_author(): bool

Parameters

ParameterDescription
NoneThis function takes no parameters.

Return Value

Return ValueDescription
booltrue if more than one author has published posts, otherwise false.

WordPress Examples

Three short theme examples. Each one shows what prints on the true path and the false path.

Example 1 — Show a byline on team blogs

Print the author name only if there is more than one author.

WordPress
<?php if ( is_multi_author() ) : ?>
  <span class="byline">By <?php the_author(); ?></span>
<?php endif; ?>

How It Works

  1. is_multi_author() counts published authors.
  2. the_author() prints the name inside the loop.
  3. A one-author blog stays simple.

Example 3 — Add a body class

Let your CSS know the type of blog.

WordPress
function mytheme_body_class( $classes ) {
  if ( is_multi_author() ) {
    $classes[] = 'group-blog';
  }
  return $classes;
}
add_filter( 'body_class', 'mytheme_body_class' );

How It Works

  1. The body_class filter changes the class list.
  2. We add group-blog only for team blogs.
  3. Many default themes use this same idea.

Frequently Asked Questions

It returns true or false (a bool). Use it inside an if statement.
No. It counts users who have published posts.
Yes. It does not need the loop or the main query.
To add a group-blog class so the design can show author details only for multi-author sites.

Next: is_multisite()

Check if WordPress Multisite (a network of sites) is enabled.

is_multisite() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

12 people found this page helpful