I am using the Wordpress theme Switty and was wondering how to entirely disable the comments section's poster. I need to create a member-only, anonymous comments section and am using Wishlist Member to do so, not that that is relevant. Users should be able to talk with one another on comments, but not know each other's user or full names, the only identification being their Retro-provided avatar. Unfortunately, I cannot provide a link to my website as it contains legally classified information, which is why I provided the theme name as it uses different php than I'm used to.

Any and all help is appreciated. Thank you all in advance.

  • this will be hard to answer without knowing how the theme displays the comment form, and how it displays the comments Commented Apr 15, 2018 at 17:51
  • The theme displays comments just like normal Wordpress pages do. The tricky part is that the php files have different names and layouts; some basic code is also omitted from the page as a whole but still somehow present. Commented Apr 15, 2018 at 18:35
  • "The theme displays comments just like normal Wordpress pages do" !== 'the php files have different names and layouts' It is impossible to fully answer a question if the relevant code is not provided Commented Apr 16, 2018 at 2:20
  • sidenote... I never saw a person that uses his real name when giving personal information on the web, but it is very obvious that human will have hard time having discussions with people without a name. maybe you are trying to solve by technology something that should be better solved in "social" manner (just advice people to select a random nick name) Commented Apr 16, 2018 at 2:24

1 Answer 1


Switty uses a standard WordPress comments implementation, so the following, added to your proper child theme functions.php, will erase comment author names.

The function could be written as an anonymous function - so very short - but I figured you just might want to return something in place of the name, plus anonymous functions are kind of un-WordPress.

 * In standard WordPress Comments
add_filter( 'get_comment_author', 'wpse_get_rid_of_comment_author' ); 

function wpse_get_rid_of_comment_author( $name ) {

   return '';


However, it will leave an orphaned "says" behind, which might look fine coming after your avatars... or I guess might not! If you don't like it, you could eliminate it with CSS ( .says {display: none; ). Otherwise, things might get a little more complicated, though you can find some ideas here: Remove "says" from comments

  • obviously the form needs to be changed as well.... Commented Apr 16, 2018 at 2:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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