I’ve added comment link in custom post type using this tutorial.
<div id="showcomments">
<i class="fa fa-comments-o" aria-hidden="true"></i>
<?php comments_popup_link( __( 'Comment', 'generatepress' ), __( '1 Comment', 'generatepress' ), __( '% Comments', 'generatepress' ) ); ?>
</div>
<div id='cp-comment-area' class="cp-comment-link">
<?php comments_template (); ?>
</div>
But the problem is, when I click on that link, it’s reloading current page.
When there is no comment, that link contains #respond at the end of the url
<a href="https://maysite.com/custompost/post1#respond">Comment</a>
When there are comments, that link contains #comments at the end of the url
<a href="https://maysite.com/custompost/post2#comments">Comment</a>
And for both cases reloading the page.
I can see there is no slash / before # in both cases.