How-to remove the author from your Twenty-Ten posts

There are more than 1300 themes available in the official Theme Directory but many WordPress blogs are using the default theme Twenty Ten. The default header of a post looks like this:

Besides the date of publications the author of the article is displayed but since most blogs are operated by single persons this information is totally unnecessary. Additionally many bloggers write their posting while they’re logged in as Administrator so that the author is displayed has “admin”. This is not only unnecessary but also looks like you can’t handle your blog correctly.

So if you’re tired of displaying the author in the head of your post you can follow this small how-to.

If you’re doing any changes to the Twenty Eleven theme you should never ever modify the files in the twentyten directory. Instead create a child theme:

  • Create a directory called myTwentyTen
  • Create a file style.css containing:
    /*
    	Theme Name: my2010
    	Theme URL: 
    	Description:2010 test child theme
    	Author: Latz
    	Author URI: http://elektroelch.de
    	Version: 1.0
    	Template: twentyten
    	
    */
    
    @import url("../twentyten/style.css");
    

    (Change Author: and Author URI to your needs.)

Create a file called functions.php. In this file we’re going to save the modified code for displaying the author’s name:

Posted on %2$s ', 'twentyten' ),
    'meta-prep meta-prep-author',
    sprintf( '',
      get_permalink(),
      esc_attr( get_the_time() ),
      get_the_date()
    )
  );
}
?>

This is the original code from Twenty Ten‘s function.php with all code removed which concerns the author. Twenty Ten has the advantage that is uses this code in all places where it displays “by author”. So there is no need to change anything else.


Comments

2 responses to “How-to remove the author from your Twenty-Ten posts”

  1. I was looking for this information. Thank you very much!

  2. Thank you very much.

Leave a Reply

Your email address will not be published. Required fields are marked *