is_author [ WordPress Function ]
is_author ( $author = '' )
| Parameters: |
|
| Uses: |
|
| See: |
|
| Returns: |
|
| Defined at: |
|
Is the query for an author archive page?
If the $author parameter is specified, this function will additionally check if the query is for one of the authors specified.
Source
<?php
function is_author( $author = '' ) {
global $wp_query;
if ( ! isset( $wp_query ) ) {
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
return false;
}
return $wp_query->is_author( $author );
}
?>
Examples [ wp-snippets.com ]
Top Google Search Results
- is_author() - WordPress Codex
Description. This Conditional Tag checks if an Author archive page is being displayed. This is a boolean function, meaning it returns either TRUE or FALSE.
codex.wordpress.org - Conditional Tags « WordPress Codex
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' ) ...
codex.wordpress.org - author - If statement for is_author of a post - WordPress
Apr 4, 2012 ... I want to show something in the sidebar of a post only if the author of the post equals a specific author or username. I was looking at is_author() ...
wordpress.stackexchange.com - Wordpress= is_author(admin) or Is_entry or similar? - Stack Overflow
Why don't you create an author.php page you can customize the way the authors page looks. see more here ...
stackoverflow.com
User discussions [ wordpress.org ]
- charlesmkelley on "Featured Posts filter problem on front page"
- charlesmkelley on "Featured Posts filter problem on front page"
- charlesmkelley on "Featured Posts filter problem on front page"
- alchymyth on "Featured Posts filter problem on front page"
- charlesmkelley on "Featured Posts filter problem on front page"
- pampfelimetten on "How to use is_author in feeds?"
- Mark / t31os on "How to use is_author in feeds?"
- pampfelimetten on "How to use is_author in feeds?"
- Mark / t31os on "How to use is_author in feeds?"
- pampfelimetten on "How to use is_author in feeds?"