Support » Fixing WordPress » Alter Comment Link Output

  • Wondering if its possible to change the out put of
    <?php comments_popup_link( 'No comments yet', '1 comment', '% comments so far', 'comments-link', 'Comments are off for this post'); ?>
    When its used it results in
    <a href="URL" class="comments-link" title="TITLE">No comments yet</a>

    I would like to change the Class of the output link. Or at least add an ID tag to it. Is this possible?

Viewing 3 replies - 1 through 3 (of 3 total)
  • If the ID tag means the Post ID, use “$post->ID” instead of ‘comments-link’ in order to add an ID to the class.

    Example:
    <?php comments_popup_link( 'No comments yet', '1 comment', '% comments so far', $post->ID, 'Comments are off for this post'); ?>

    Thread Starter MarshallB

    (@marshallb)

    Kurosquare, thank you for the reply.

    ID tag meant, id=”soemthing” — but what you said will change the class name. which is good enough, thank you

    What file can I make that change in? I just want to change the comment link title.

    edit: I found it, it was index.php in /wp-content/themes/lightword

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Alter Comment Link Output’ is closed to new replies.