WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Comment Permalink not jumping (7 posts)

  1. HYP
    Member
    Posted 7 years ago #

    There are similar threads on this, but I couldn't directly apply to my theme, so I had to start a new one, hoping someone can help:

    Each of my comments' permalinks aren't doing the jump-to as it's supposed to on Firefox. When I click on comment #1 on a post, the address bar shows

    http://mysite.com/2007/08/14/new-post/#1537

    but nothing happens, the page doesn't move to that comment, it just stays in one place (if you scroll the page to the top and click enter on the address bar, it won't jump -- same thing with the Recent Comments widget links)

    I guess it's something to do with this part:

    <dt class="<?php echo $class; ?>">
    			<a href="#<?php comment_ID() ?>"><?php echo $commentCount."."; ?></a>

    but I'm at a lost, help please, thanks!

    Theme is Regulus

  2. HYP
    Member
    Posted 7 years ago #

    Bump, anyone?

    I guess I should say my site/blog is http://thehypeguy.com I really appreciate it!

  3. JoyceD
    Member
    Posted 7 years ago #

    <dt class="<?php echo $class; ?>" id="#<?php comment_ID() ?>">
    			<a href="#<?php comment_ID() ?>"><?php echo $commentCount."."; ?></a>

    That should do it.

  4. TheHypeGuy
    Member
    Posted 7 years ago #

    Yes! Thanks JoyceD! That solved the Comment permalink when clicking in the comments section.

    (here comes part 2..)

    What about the Recent Comments widget? Right now, those links are still linking #comment- which doesn't go to the comment. Do I put the same code in the Comments file?

  5. HYP
    Member
    Posted 7 years ago #

    *not to bump on purpose* just wanted to say ^ TheHypeGuy is me (I couldn't find this account's password for a moment and it was too late to Edit the above)

    carry on..

  6. JoyceD
    Member
    Posted 7 years ago #

    Change the same part to this then:

    <dt class="<?php echo $class; ?>" id="comment-<?php comment_ID() ?>">
    			<a href="#comment-<?php comment_ID() ?>"><?php echo $commentCount."."; ?></a>
  7. HYP
    Member
    Posted 7 years ago #

    Hurrah! It worked again! JoyceD thank you so much! Very helpful and appreciated

Topic Closed

This topic has been closed to new replies.

About this Topic