• 0

DMS 1 Change "Leave a reply" text in comments


Question

Posted · Report post

Hi Guys,

 

I'm looking to re-word the "Leave a reply" text in the comments section. 

 

I have done a bit of looking around the various wordpress forums and found that by adding the following to the comments.php file i can get it working but unfortunately the comments section is now doubling up. 

 

comment_form(); ?>
    
    <?php comment_form( array( 'title_reply' => 'Comment here please', 'label_submit' => 'Go go go!' ) ); ?>

 

I wonder does anyone no what ive done wrong? Problem can be seen here: http://gwd-test.flcreative.ie/?p=76

 

Thanks,

 

Sean

Share this post


Link to post
Share on other sites

2 answers to this question

  • 0

Posted · Report post

Hi there, if you edit the core files the changes will be wiped out each time you update.

 

You'll need to add this as a filter inside the functions.php of a child theme like - https://github.com/Dannyholt/Skeleton

 

function comment_reform ($arg) {
$arg['title_reply'] = __('Your text goes here');
return $arg;
}
add_filter('comment_form_defaults','comment_reform');

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

James B 

Awesome worked a treat! 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now