Title: Conditional for author
Last modified: August 19, 2016

---

# Conditional for author

 *  [garyrw](https://wordpress.org/support/users/garyrw/)
 * (@garyrw)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/conditional-for-author/)
 * I am trying to add some conditional text for a specific post author. Normally
   the byline for an author says ‘By [author name]’. For one particular author I
   want it to read ‘Posted by [author name]’. I have tried the following on the 
   archive template but with no success:
    `<?php if (author_name('3')) { ?>Posted
   <?php } ?>by <?php the_author() ?>`
 * Any suggestions on how to do this?

Viewing 1 replies (of 1 total)

 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/conditional-for-author/#post-1254657)
 * see if this page helps
    [http://codex.wordpress.org/Author_Templates](http://codex.wordpress.org/Author_Templates)

Viewing 1 replies (of 1 total)

The topic ‘Conditional for author’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/conditional-for-author/#post-1254657)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
