# Remove Links From Comment Author Names

> Shows commenter names as plain text instead of links to their websites, removing the main reward for comment spammers.

- Type: PHP
- Runs: Run everywhere
- Category: [Comments](https://wpide.com/library/category/comments/)
- Tags: comments, spam, links
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/unlink-comment-author-names/

## Code

```php
add_filter( 'get_comment_author_link', function ( $link, $author ) {
    return esc_html( $author );
}, 10, 2 );
```

## Notes

Combine with removing the website field so new commenters are not asked for a URL.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Remove Links From Comment Author Names" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
