It’s working for me. What’s the code look like for your “trigger”?
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’;
}
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.
Thanks. That works π
BTW: I actually used zero (0). Shouldn’t that work too?
“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).
Thanks for the clarifications.
Wish you a Happy New Year.