Wordpress Snippets

Change Reply Link Text on Threaded Comments

There are many comment services available for WordPress like Disqus, Intense Debate, Facebook Comments, Google+ Comments and many more. But most of the WordPress themes still utilize the standard WordPress comments system. Because it’s very easy to use, nothing to set up and works flawless out of the box. WordPress introduced a simple tag in version 3.0 to output the complete commenting form within a theme template which makes it a little difficult to modify comment form. In future articles, we will be showing you how to customize comments and reply form but in this article, I am interested in changing reply link text on comments.

If you have enabled threaded comments in your website then you must have noticed a small reply link on each comment which lets users post a comment in reply to a specific comment. Changing reply link text is really not that difficult but it’s not straight forward too since whole comment form is generated by a function.

To change reply link text on comments, simply paste this code snippet in functions.php file. Don’t forget to change text in below snippet.

// change reply text on threaded comments in wordpress
function wcs_change_comment_reply_text( $link ) {
    $link = str_replace( 'Reply', 'Reply to this comment', $link );
    return $link;
}
add_filter( 'comment_reply_link', 'wcs_change_comment_reply_text' );

Hire Us. Or just say Hi!
Need a job? Apply to get one.