Title: is_author function broken
Last modified: August 18, 2016

---

# is_author function broken

 *  [angsuman](https://wordpress.org/support/users/angsuman/)
 * (@angsuman)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/is_author-function-broken/)
 * is_author() function is broken in WP 2.0. It doesn’t trigger on author pages.
 * Is the issue known / being fixed?
    Any patch available?

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

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/is_author-function-broken/#post-305782)
 * It’s working for me. What’s the code look like for your “trigger”?
 *  Thread Starter [angsuman](https://wordpress.org/support/users/angsuman/)
 * (@angsuman)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/is_author-function-broken/#post-305783)
 * if(is_author()) {
    // Do blah blah }
 * I am calling it in a function which is hooked to template_redirect.
 * At the same location other functions like is_date() or is_single() etc. are working.
 * And I am calling an author page by:
    [http://hostname/index.php/author/0/](http://hostname/index.php/author/0/)
   or [http://hostname/index.php?author=0](http://hostname/index.php?author=0)
 *  Thread Starter [angsuman](https://wordpress.org/support/users/angsuman/)
 * (@angsuman)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/is_author-function-broken/#post-305785)
 * In fact is_author() is also not working in a template. As you like code here 
   it goes:
 * if(is_author()) {
    echo ‘I am in Author Archive’; }
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/is_author-function-broken/#post-305790)
 * Uh, nope. No problem here with is_author() under any of those conditions. Could
   the issue be related to passing the author value of 0? That should be considered
   an invalid ID.
 *  Thread Starter [angsuman](https://wordpress.org/support/users/angsuman/)
 * (@angsuman)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/is_author-function-broken/#post-305850)
 * Thanks. That works 🙂
 * BTW: I actually used zero (0). Shouldn’t that work too?
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/is_author-function-broken/#post-306000)
 * “_I actually used zero (0). Shouldn’t that work too?_“
 * Beyond the fact WordPress doesn’t provide 0 for an user ID? Well, it runs into
   the same issue something like `?page_id=0` would, which is in such a query you’re
   actually passing a null value. When that happens WP assumes no query has taken
   place, and just uses the default query (which would be the home page).
 *  Thread Starter [angsuman](https://wordpress.org/support/users/angsuman/)
 * (@angsuman)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/is_author-function-broken/#post-306087)
 * Thanks for the clarifications.
    Wish you a Happy New Year.

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

The topic ‘is_author function broken’ is closed to new replies.

## Tags

 * [is_author](https://wordpress.org/support/topic-tag/is_author/)
 * [template tag](https://wordpress.org/support/topic-tag/template-tag/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [angsuman](https://wordpress.org/support/users/angsuman/)
 * Last activity: [20 years, 4 months ago](https://wordpress.org/support/topic/is_author-function-broken/#post-306087)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
