Changing Comment Titles in WordPress

This article is less than a 1 minute read

If you use Underscores.me or another WordPress starter theme , you’ve likely had the pleasure of trying to figure out where the heck you can change the default comment title “Leave a Reply” to something a little more custom ( I like the term, ‘Join the Conversation’).

changing comment titles in WordPress

Many people’s first instinct would be to dive directly into the comments.php file and edit the hard text. I’l save you the trouble, ’cause it’s not there. It’s actually in the wp-includes folder. Now, I know what you’re thinking…

I’ll just go into the wp-includes folder and change it directly in the source file

Nope. Stop. Don’t do it.

The wp-includes folder controls aspects of WordPress core, and not only do you risk changing something in core that is necessary for WordPress to run, but in a future update of core, it’s likely that your changes will be over-ridden, and reverted back to the default state.

Instead, you are able to pass arguments through this template tag:

<?php comment_form(); ?>

You can view all of the specific arguments here in the codex, or you can grab the snippet I made below.

Note: The following snippet is┬ámodifying the template tag I referred to above, so you’ll need to locate it in your comments.php file. Hint: It’s probably close to the bottom of the file, before the closing tags.

Copy this snippet to comments.php of your WordPress starter theme!

<?php
      comment_form(array(
      'title_reply' => __( 'Join the Conversation, Leave a Reply' ),
 ));?>

Remember to leave a comment, and share on twitter if this post was helpful to you!

Share Below:

 

Love this post?
Sign up for updates!

Join the Conversation, Leave a Reply

Your email address will not be published. Required fields are marked *