Title: get_comment_link
Published: April 25, 2014
Last modified: February 24, 2026

---

# apply_filters( ‘get_comment_link’, string $comment_link, WP_Comment $comment, array $args, int $cpage )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/get_comment_link/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/hooks/get_comment_link/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/hooks/get_comment_link/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/get_comment_link/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/get_comment_link/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/get_comment_link/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/get_comment_link/?output_format=md#wp--skip-link--target)

Filters the returned single comment permalink.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/get_comment_link/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/hooks/get_comment_link/?output_format=md#see-also)󠁿

 * [get_page_of_comment()](https://developer.wordpress.org/reference/functions/get_page_of_comment/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/get_comment_link/?output_format=md#parameters)󠁿

 `$comment_link`string

The comment permalink with `'#comment-$id'` appended.

`$comment`[WP_Comment](https://developer.wordpress.org/reference/classes/wp_comment/)

The current comment object.

`$args`array

An array of arguments to override the defaults.

`$cpage`int

The calculated `'cpage'` value.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/get_comment_link/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'get_comment_link', $comment_link, $comment, $args, $cpage );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/comment-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/comment-template.php#L862)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/comment-template.php#L862-L862)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/get_comment_link/?output_format=md#related)󠁿

| Used by | Description | 
| [get_comment_link()](https://developer.wordpress.org/reference/functions/get_comment_link/)`wp-includes/comment-template.php` |

Retrieves the link to a given comment.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/get_comment_link/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.4.0](https://developer.wordpress.org/reference/since/4.4.0/) | Added the `$cpage` parameter. | 
| [2.8.0](https://developer.wordpress.org/reference/since/2.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fget_comment_link%2F)
before being able to contribute a note or feedback.