Title: comments_link_feed
Published: April 25, 2014
Last modified: April 28, 2025

---

# apply_filters( ‘comments_link_feed’, string $comment_permalink )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/comments_link_feed/?output_format=md#parameters)
 * [More Information](https://developer.wordpress.org/reference/hooks/comments_link_feed/?output_format=md#more-information)
 * [Source](https://developer.wordpress.org/reference/hooks/comments_link_feed/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/comments_link_feed/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/comments_link_feed/?output_format=md#changelog)

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

Filters the comments permalink for the current post.

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

 `$comment_permalink`string

The current comment permalink with `'#comments'` appended.

## 󠀁[More Information](https://developer.wordpress.org/reference/hooks/comments_link_feed/?output_format=md#more-information)󠁿

The **comments_link_feed** allows you to alter the link to the comments section 
of a post within the context of a feed.

When the ‘comments_link_feed’ filter is called, it is passed once parameters: the
list item containing the powered by link.

    ```php
    <pre>add_filter( 'comments_link_feed', 'filter_function_name', 10 );

    function filter_function_name( $link) {
    // Manipulate comment link
    return $link;
    }
    ```

Where ‘filter_function_name’ is the function WordPress should call when the filter
is run. Note that the filter function **must** return a value after it is finished
processing or the result will be empty.

**filter_function_name** should be unique function name. It cannot match any other
function name already declared.

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

    ```php
    echo esc_url( apply_filters( 'comments_link_feed', get_comments_link() ) );
    ```

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

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

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

Outputs the link to the comments for the current post in an XML safe way.

  |

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

| Version | Description | 
| [3.6.0](https://developer.wordpress.org/reference/since/3.6.0/) | Introduced. |

## User Contributed Notes

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