• Firstly, can I ask why does WordPress add an anchor tag around the date/time stamp for user comments?

    And secondly, how do you remove this link? I can’t find anywhere obvious to do this.

    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • WordPress doesn’t add that; theme authors do. In your theme files – like index.php, single.php, etc. – look for something like:

    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>

    But the exact format of any comments link will depend on your theme.

    Thread Starter johnasp

    (@johnasp)

    Ah right got it thanks. What woud someone want to create an anchor around the date, just out of interest? I dont get why they would add a link around the date/time of post.

    I have this same question… I found that line of code, but it doesn’t seem to effect the link in the comment dates. I don’t mind it there if seemed to have a purpose, but I can’t figure out what the purpose might be. Anyway, does anyone know how to remove the anchor tags from the comment dates in Kubrick? Thanks!

    OK, figured it out… In my case I had to find this:

    <date class="comment-meta commentmetadata">
            <a href="<?php echo htmlspecialchars( get_comment_link(
            $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at
            %2$s'), get_comment_date(),  get_comment_time()) ?></a>
            <?php edit_comment_link(__('(Edit)'),'  ','') ?>
          </div>

    and just take out the anchor:

    <date class="comment-meta commentmetadata">
            <?php printf(__('%1$s at
            %2$s'), get_comment_date(),  get_comment_time()) ?>
            <?php edit_comment_link(__('(Edit)'),'  ','') ?>
          </div>

    I would like to change this post to ‘resolved’, but the option is gone now. Oh well, it probably differs a lot from theme to theme anyway.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove link from comment dates?’ is closed to new replies.