I’m having some trouble with the customization of the comment form. The theme I am using is a child theme of Twenty Eleven and can be found on http://www.chavanonkoor.nl.
I would like to change some of the default variables used by comment_form() which is called from comments.php.
In order to do this I copied comments.php to my childs theme folder and followed the example from http://codex.wordpress.org/Function_Reference/comment_form. I plugged in the following code in comments.php before the comment.form() call.
<?php $comments_args = array(
// change the title of send button
'label_submit'=>'Send',
// change the title of the reply section
'title_reply'=>'Write a Reply or Comment'
);
?>
Then I replaced comment.form() by comment.form($comments_args) and it should replace the defined variables. Only it doesn’t.
Does anybody have any ideas about this? I’ve been looking for an answer for a couple of hours but I didn’t find one.
Thanks!
The topic ‘Customize comment form’ is closed to new replies.
(@jfarts)
10 years, 10 months ago
Hey there,
I’m having some trouble with the customization of the comment form. The theme I am using is a child theme of Twenty Eleven and can be found on http://www.chavanonkoor.nl.
I would like to change some of the default variables used by comment_form() which is called from comments.php.
In order to do this I copied comments.php to my childs theme folder and followed the example from http://codex.wordpress.org/Function_Reference/comment_form. I plugged in the following code in comments.php before the comment.form() call.
Then I replaced comment.form() by comment.form($comments_args) and it should replace the defined variables. Only it doesn’t.
Does anybody have any ideas about this? I’ve been looking for an answer for a couple of hours but I didn’t find one.
Thanks!