[resolved] Comments Don't Have Permalinks (9 posts)

  1. NLXJ
    Posted 7 years ago #

    My new blog, first one on WP, have used MT since 2003. I have searched and read for a while, but am hoping someone here can help quicker and with less headache, thank you in advance for your time and know-how.

    I realize now that the theme maker of the original "Freestyle" (I've tweaked it a lot already) made some errors. Or was sloppy. Too late now, I'm deep in and I like where it's going. One of the errors is that the comments have no permalink.

    Can you help me figure out where and how to add the right code to make that show up?

    Thank you.

  2. I think I see what you are talking about.

    When you click the link on the home page to jump to the single post page with #comments or #respond, it doesn't jump down immediately. That's easy enough to correct.

    In your theme, look at the comments.php file. This is what displays the comments, and reply box. What you need to do is to determine the point on the page where you want the #comments and #respond links to jump to, then add the correct ID's.

    I took a look at one of your pages source, and what I think you need to do is the following:

    Find this:
    <h4 class="reply">
    and replace it with this:
    <h4 class="reply" id="comments">

    Also find this:
    <h4 id="postcomment">
    and replace it with this:
    <h4 id="postcomment" id="respond">

    And there you go.

    If that's not what you were talking about, then try to explain. Also post a copy of your theme's comments.php on http://wordpress.pastebin.ca and give us the link here, so we can better tell you how to correct your issue.

  3. NLXJ
    Posted 7 years ago #

    Otto42, I really appreciate that little tweak. I like that. Unfortunately, it's not the actual problem I'm hoping to fix. Let me try to be clearer, sorry.

    FIrstly, my comments.php file is here. (Done before I made the changes you helped me with.)

    What I mean is this. On all blogs normally, you can link to any comment. Just as a post has a permalink, so do comments.

    But on this theme, there are none! Ideally, where it says " [commenter] said, on December 14th, 2007 at 12:28 pm" I would like that to be a link to the comment.

    Can you help with this?

  4. moshu
    Posted 7 years ago #

    Looking at any other theme's comments.php template file you can find this:
    <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> @ <?php comment_time() ?></a>

  5. NLXJ
    Posted 7 years ago #

    I believe you, thank you, moshu.

    Is there a particular place I should drop that in? A tag I should replace? Thanks.

  6. moshu
    Posted 7 years ago #

    Yes, it has to be in the comment loop.
    See the default and the classic.

  7. moshu
    Posted 7 years ago #

    I put it in line 35... but you can use it around the date, too.

  8. NLXJ
    Posted 7 years ago #

    thank you for that moshu, i will fool around with that example and see if i can make it work, and if so, will be back to close/resolve this issue.

  9. NLXJ
    Posted 7 years ago #

    excellent!!! thank you so much for that work. and thank you both for the speedy help. i'm telling you, WP is getting on my good side quick just from the tech help here.

Topic Closed

This topic has been closed to new replies.

About this Topic