Possible Duplicate:
Change comments form title on a page by page basis

I'm looking to change the comments form title (my theme defaults this to "Leave a Comment" or "Leave a reply to").

I thought perhaps I could add a hook to comment_form_defaults but my snippet below isn't working... any thoughts?

add_filter('comment_form_defaults', 'askQuestion');

function askQuestion($defaults) {
  $defaults['title_reply'] = 'Ask a Question';
  $defaults['title_reply_to'] = 'Your text %s';
  return $defaults;

This is being added to the HTML editor of the page editor within wordpress. We are using the ExecPHP plugin to compile code within posts/pages. We are looking for a way to do this on just this page, not every comment form on our blog.

marked as duplicate by user1468, Rarst Sep 11 '11 at 21:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from stackoverflow.com Aug 7 '11 at 4:51

This question came from our site for professional and enthusiast programmers.


Please be clear for what u need to ask. As i approach to your query.you should first login to your admin panel.now click on appearance and then click editor option.here comes all the files of your theme directory.Look for comment.php. Just open it up and look for default message.Now this is the place where you can replace your own custom message.

  • Amar - please read the question - "We are looking for a way to do this on just this page, not every comment form on our blog." Your suggestion would effect every comment form on the blog. – themerlinproject Aug 6 '11 at 15:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.