WordPress.org

Support

Support » Themes and Templates » Comments link doesn’t go to the comments

Comments link doesn’t go to the comments

Viewing 4 replies - 1 through 4 (of 4 total)
  • Crap. Forgot the code tag. Here’s the whole thing:

    <a href="<?php comments_link(); ?>"><?php comments_number('Leave a comment','One comment','% comments'); ?></a>

    I’ve found a fix that worked for me. I only just discovered I have this problem too as I use Firefox browser and everything worked fine. However, I just found whilst using Internet Explorer that none of my comment links actually went through the comments.

    All my links which I’d customised to say “no comments yet what do you think?” just went to the top of the article from the index page. If I scrolled down to the bottom of an article and clicked the comment link nothing happened.

    After finding this thread and being disappointed the answer was not here I tried to fathom it out myself. I remembered reading in a book some years back that when creating HTML anchor links it is best to use a specific method which I had always used.

    Checking the comments.php file I could see the use of <a href="#respond">Leave your comment</a>

    I found that the anchor link for responding to the comments link was as follows <a name="respond"></a>

    I changed this link to <a name="respond" id="respond">&nbsp;</a> And now my links work in Internet Explorer.

    wanderlustwp
    Member

    @wanderlustwp

    I had the same problem. Washerhelp’s solution worked for me. Thank you!

    Note: I had a different line of code in my comments.php file that needed replacing. It took me a while to find because I was looking for the:

    But instead it turned out to be:
    <div id=”respond”>

    Replacing it with: ‘ 
    worked like a charm.

    wanderlustwp
    Member

    @wanderlustwp

    I had the same problem. Washerhelp’s solution worked for me. Thank you!

    Note: I had a different line of code in my comments.php file that needed replacing. It took me a while to find, but it turned out to be:
    <div id="respond">

    Replacing it with: <a name="respond" id="respond">&nbsp;</a>
    worked like a charm.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Comments link doesn’t go to the comments’ is closed to new replies.