Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

What do I need to do in order to have the author name in the blog posts on my wordpress blog?

currently when I view a post it doesn't have the author that wrote the post.

share|improve this question

2 Answers 2

The code needs to go in single.php, which you'll most likely find in your theme folder. If you are using a child theme, you might not see it; in which case, copy the file from the parent theme to your child theme folder. The WordPress function you need is the_author, so to get the author's name, add something like this inside the loop:

 <p>This post was written by <?php the_author(); ?></p>    
share|improve this answer

This will be somewhat dependent on where your single post view is stored, but you'd be looking to add something to the effect of:


echo __('Written by', 'text_domain') .' <a href="'. get_author_posts_url(get_the_author_meta('ID')) .'" rel="author" class="fn">'. get_the_author() .'</a>';
share|improve this answer
Where do I add this? How do I find that single post view? – Thomas Stringer Dec 11 '12 at 3:45
@ThomasStringer Have a look at – shea Dec 11 '12 at 6:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.