function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) {}

Display the comment feed link for a post.
Prints out the comment feed link for a post. Link text is placed in the anchor. If no link text is specified, default text is used. If no post ID is specified, the current post is used.


  • string $link_text: Descriptive text.
  • int $post_id: Optional post ID. Default to current post.
  • string $feed: Optional. Feed format.

Return values

returns:Link to the comment feed for the current post.

Defined filters

  • post_comments_feed_link_html
    apply_filters( 'post_comments_feed_link_html', "<a href='$url'>$link_text</a>", $post_id, $feed )

Source code

function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) {

	$url = get_post_comments_feed_link($post_id, $feed);

	if ( empty($link_text) )

		$link_text = __('Comments Feed');

	echo apply_filters( 'post_comments_feed_link_html', "<a href='$url'>$link_text</a>", $post_id, $feed );



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: