Add commentary form my own text


#1

Hi Satish,
I would like to add my own text in the comment field.
I have achieved this on some themes with the following code in function.php:

 function comment_after_policy_field() {
echo '<p>My text</p>';

}
add_action(‘comment_form_after_fields’, ‘comment_after_policy_field’);

But he Page Speed comment form is structured differently.

Here: First “Name”, “Email adress”, “Your website url” and then the field for the text.
Otherwise: the field for the text and then first “Name”, “Email adress”, “Your website url”.

This will display the text above the comment text box with my code.
I would like to show the text under the comment field.

Can you tell me the code to my text above or below the button “Post Comment”?

Thanks for your help
tom


#2

Sorry, missed your thread.

Use the comment_form hook instead of comment_form_after

Here are the list of hooks you can try to adjust the placement

  • comment_form_comments_closed
  • comment_form_before
  • comment_form_must_log_in_after
  • comment_form_top
  • comment_form_logged_in_after
  • comment_form_before_fields
  • comment_form_after_fields
  • comment_form
  • comment_form_after

#3

Thank you, is working!


closed #4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.