Languages: English • 日本語 (Add your language)
The get_comments_link template tag returns the URL to the specified or current post's comments.
Use comments_link to echo the value for the current post.
<?php get_comments_link( $post_ID ); ?>
<a href="<?php echo get_comments_link( $post->ID ); ?>"> Comments to this post </a>
get_comments_link()
is located in wp-includes/get_comment-template.php
.