Title: Remove comment author
Last modified: August 20, 2016

---

# Remove comment author

 *  [kpelham](https://wordpress.org/support/users/kpelham/)
 * (@kpelham)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/remove-comment-author/)
 * I need to remove comment author (for privacy)from comments. Would like to have
   just the date the comment was submitted.
 * Does anybody know how to do this? I am using a child theme 3.4
 * THANKS!!!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/remove-comment-author/#post-2831830)
 * child theme 3.4? Is that a child theme of 2011?
 * Also, do you wish to just prevent the commenter name from appearing publicly,
   or you never wish them to input it in the first place?
 *  Thread Starter [kpelham](https://wordpress.org/support/users/kpelham/)
 * (@kpelham)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/remove-comment-author/#post-2831831)
 * yes.. twenty eleven 3.4 child
 * I want the names to not show publically. Using css, they are still there…but 
   not visible to the eye. (not good enough)
 * Thank you!!
 *  [null](https://wordpress.org/support/users/xiroxas/)
 * (@xiroxas)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/remove-comment-author/#post-2831857)
 * You could use the following code to remove the author’s name from the comment
   thread and feed. Put this into your _child theme’s_ functions.php file:
 *     ```
       if ( ! function_exists( 'hide_comment_author' ) ) :
   
       function hide_comment_author( $author ){
         return '';
       }
       add_filter( 'get_comment_author', 'hide_comment_author' );
       add_filter( 'comment_author_rss', 'hide_comment_author' );
   
       endif;
       ```
   
 * However, you may want to modify your theme’s comment template to account for 
   this so that it doesn’t seem awkward. You will need to override Twenty Eleven’s
   twentyeleven_comment() function in your child theme. You can do that by creating
   a **new function in your child theme** with the same name, pasting the contents
   of the original twentyeleven_comment() in it, and changing the part that prints
   the comment info to this:
 *     ```
       printf( __( '%1$s', 'twentyeleven' ),
           sprintf( '<a href="%1$s"><time pubdate datetime="%2$s">%3$s</time></a>',
               esc_url( get_comment_link( $comment->comment_ID ) ),
                   get_comment_time( 'c' ),
               sprintf( __( '%1$s at %2$s', 'twentyeleven' ), get_comment_date(), get_comment_time()
       )));
       ```
   
 * This should fix your theme so that it only tries to display the date/time and
   it doesn’t look weird.
 *  Thread Starter [kpelham](https://wordpress.org/support/users/kpelham/)
 * (@kpelham)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/remove-comment-author/#post-2831910)
 * Aha!The first piece of code worked great. When I added the second piece to functions
   it made the page full browser in ie (shooooock!) and made no difference in appearance.
   Now it says
 * on June 19, 2012 at 5:18 pm
 * I can live with that! Thank you VERY much
 *  [null](https://wordpress.org/support/users/xiroxas/)
 * (@xiroxas)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/remove-comment-author/#post-2831913)
 * Awesome! I’m glad it worked for you 🙂
 * Haha I’m not even sure why that chunk of code would do that _even that in demon
   of a browser_. I know you said you are fine with that, but I kind of like to 
   get it 100% right. If you want to, you could post your child theme’s functions.
   php and I could take a look at it ( maybe upload it to [Pastebin](http://pastebin.com/)
   or something? ) 🙂
 * If not, I understand – you don’t want to break the part that you just fixed 😛
 *  Thread Starter [kpelham](https://wordpress.org/support/users/kpelham/)
 * (@kpelham)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/remove-comment-author/#post-2831919)
 * Hey! I have a bad habit of fixing it until its broke… so here goes! LOL
 * <?php
    if ( ! function_exists( ‘hide_comment_author’ ) ) :
 * function hide_comment_author( $author ){
    return ”; } add_filter( ‘get_comment_author’,‘
   hide_comment_author’ ); add_filter( ‘comment_author_rss’, ‘hide_comment_author’);
 * endif;
 * ?>
 *  [null](https://wordpress.org/support/users/xiroxas/)
 * (@xiroxas)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/remove-comment-author/#post-2831923)
 * Awesome! Let’s try and get the second part working, too 😀
 * Perhaps some screenshots would help?
 * Open your WordPress Dashboard. Go To Appearance->Editor. In the drop down at 
   the top right choose the Twenty Eleven theme (**not** the _child_ theme). Click
   on functions.php on the right.
 * 1) [Use the find function in your browser to find _twentyeleven\_comment_](http://i.imgur.com/Og40q.jpg)
 * 2) [Copy from
    _if ( ! function\_exists( ‘twentyeleven\_comment’ ) ) :_ all the
   way down to and including _endif; // ends check for twentyeleven\_comment()_ 
   and then switch back to editing your child theme using the drop down and paste
   that chunk into your **child theme’s** functions.php
 * 3) [Replace the part that starts with
    _/* translators: 1: comment author, 2:
   date and time */_ and ends with _);_ in the child theme with the second chunk
   of code from my first post and it should work! 🙂
 * Let me know how it goes!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Remove comment author’ is closed to new replies.

## Tags

 * [comment author](https://wordpress.org/support/topic-tag/comment-author/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [null](https://wordpress.org/support/users/xiroxas/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/remove-comment-author/#post-2831923)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
