Support » Themes and Templates » Making author name appear in posts

  • I can’t find a way to do this and manage a couple blogs. I keep finding answers that are years old saying “comment back in the author name in the template code” but I after hours of searching I have no idea how to access that. Making blog author name appear on blog posts shouldn’t be THIS hard!!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • In most themes, the author name appears below the post. What theme are you using?

    To include it in the page that displays just the post, you need to add some code to the file in your theme that displays single posts, usually single.php or in newer themes something like content-single.php. Here is more information on the code you need to add:

    Something like this: ‘<p>This post was written by <?php the_author(); ?></p>’

    If you let us know what theme you are using it will be easier to give advice.

    Good luck,

    Hi Jo. Thanks for the response. I have looked and looked and have not found where the templates are for me to update the code. I’m using plain ole Twenty Twelve. Any suggestions on how to find the template?


    Sorry for delayed reply.

    You want to open content.php
    (*important – see note below re: child themes)

    Around line 38, find this:

    <div class="entry-content">
    			<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?>

    and under that, add this:

    <?php if ( is_single() ) : ?>
    			<p>This post was written by <?php the_author(); ?></p>
    			<?php endif; // is_single() ?>


    * (you really should use a child theme if you’re not. To do that simply add a new folder called mychildtheme (or whatever you prefer) in your themes folder at:

    Add a style.css file that contains this:

    Theme Name:     My Child Theme
    Description:    Child theme for the Twenty Twelve theme
    Author:         Your name here
    Author URI:
    Template:       twentytwelve
    Version:        0.1.0
    @import url("../twentytwelve/style.css");

    then add the edited content.php file in to that folder

    (Then activate the child theme in your admin panel)



    Forum Moderator

    it is one of the ‘tricks’ in Twenty Twelve too hide the author if there is only one othor in the site;

    (done by an added body_class and css)

    to show the info, add this to style.css of a child theme or to a custom css plugin:

    .single-author .entry-meta .by-author {
    	display: inline;
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Making author name appear in posts’ is closed to new replies.