Warning: Trying to access array offset on value of type bool in /var/www/vhosts/tomelliott.com/httpdocs/wp-content/themes/tomelliott/single.php on line 12

Remove author & date link from WordPress (TwentyTen Theme)

19 January, 2011 by Tom Elliott

This is my first encounter with WordPress (I apologise for the default styling and design!) and I thought how better to start my entry into the blogging world than with a quick post about WordPress itself.

The small issue in question was trying to remove the date link & author name from blog posts in WordPress, whilst still displaying the date rather than remove the line completely. Since I’m going to be the only author there’s little point displaying my name on every post.

OK so I’m using Twenty Ten default theme at the moment (the below code process will be different with other Themes). From the editor in the Appearance menu, select the functions.php file and find the entry (on line ~440):

<span class="%1$s">Posted on</span> %2$s
<span class="meta-sep">by</span> %3$s

and change it to the following, which gets rid of the author part:

<span class="%1$s">Posted on</span> %2$s

To remove the link from the date, find the following line of code a couple of lines further down:

<a title="%2$s" rel="bookmark" href="%1$s">
<span class="entry-date">%3$s</span></a>

and remove the a tags so it looks like:

<span class="entry-date">%3$s</span>

Presto! We now have all blog posts with a non-linked date.

Renaming your WordPress Blog URL »


  • Alison says:

    Thank you!!!!! Now I just have to get rid of the “Posted on” before the date.

  • tomelliott says:

    Hi Alison,
    Removing the line
    Posted on %2$s
    Should get rid of the posted on bit before the date, though I’ve since changed the theme so I can’t test to make sure!

  • Alex says:

    Hello ! I am using a different theme, how will be the procedure for me to remove the author, date and “Posted in …”? Please help me…thanks a lot !!!

  • Tom Elliott says:

    Hi Alex,

    To remove the author and date from other WordPress themes, there’s a good chance that they are using the standard the_author() function and the_time() functions so look out for code blocks that look like: by and delete or comment out.

    Different themes may use different file names but usually (as is the case with the default blue WordPress theme), the main page will be index.php so this would be the first place you would want to look. If you want to remove the author and date from the individual post pages as well, check the single.php file.

    Hope that helps,

  • Jimmy says:

    Hi, I have done this, and nothing happens, I am trying to remove the post date, author, and the bit of text that read ‘Comments off’ underneath on the TwentyTen theme. To see what I mean, goto cartridgecentre.co.uk and search ‘warranty’ (for example) and if you could help me, I would scenically be grateful!
    Here is the entire PHP from functions.php:


  • Tom Elliott says:


    I removed the code you posted (there was a lot of it!) but it does look different to my version of functions.php for the TwentyTen theme, perhaps it’s a different version.

    If you search for the text ‘Posted on %2$s’ and remove it (leaving the quotes), hopefully that will work. Keep a backup though just in case!

  • Rachelle says:

    Super helpful! I searched all over wordpress’ forums and couldn’t even find this. Thanks so much for taking the time to document it!

  • Jason says:

    Pointed me in the right direction. Thanks!

  • Carsten says:

    Thanks for your advice. The link removal for the author and date link was just what I was looking for.

  • Sheryl says:

    I need serious help. I changed Posted on %2$s
    by %3$s
    Posted on %2$s

    Now my site is blank and so is my wp-admin page!!!!!!!!
    I am not very tech savvy but believe I may have to change some files in my Hostgator hosting.

  • Tom Elliott says:

    Hi Sheryl,

    Sounds like a nightmare, this shouldn’t have happened from just changing the Posted on line so maybe the file is corrupt or you accidentally deleted some extra code.

    Either way, you should try to restore the file you edited, if you are using the TwentyTen theme, it should be the functions.php file. Without the wp-admin console, you will need to FTP to the site and find the themes folder which should be as follows: [root-folder]/[blog-folder]/wp-content/themes/[theme-name]. You can see the last file modified by ordering files by date. You can then try and either download and edit the last modified file to try and undo your last action or download the theme zip file and find and and re-upload the last modified file (if you haven’t previously made any other changes to it).

    Hope that helps!

  • Samuel says:

    Great solution ! But a question : how to use that with a theme_child ? I have a functions.php file here, what should I write there just to keep “Posted on” and not by ?
    Thank you !

  • George says:

    Any suggestion for getting rid of the author and date link on comments?