Languages: English • 日本語 (Add your language)
This Conditional Tag checks if an Author archive page is being displayed. This is a boolean function, meaning it returns either TRUE or FALSE.
<?php is_author($author); ?>
is_author(); // When any Author page is being displayed. is_author('4'); // When the archive page for Author number (ID) 4 is being displayed. is_author('Vivian'); // When the archive page for the Author with Nickname "Vivian" is being displayed. is_author('john-jones'); // When the archive page for the Author with Nicename "john-jones" is being displayed. is_author(array(4,'john-jones','Vivian')); // When the archive page for the author is either user ID 4, or user_nicename "john-jones", or nickname "Vivian". Note: the array ability was added at Version 2.5.
Since: Version 1.5
is_author() is located in wp-includes/query.php
.