WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/comments link

Description

The comments_link template tag displays the URL to the current post's comments. This tag must be within The Loop, or the loop set up for comments.

Use get_comments_link to retrieve the value.

Usage

 <?php comments_link(); ?> 

Example

<a href="<?php comments_link(); ?>">
    Comments to this post
</a>

Parameters

This tag has no parameters.

Source Code

comments_link() is located in wp-includes/comment-template.php.

Related

Comments Functions

See also index of Function Reference and index of Template Tags.