Looking to change the default “Your email address will not be published. Required fields are marked *” text that appears above the input fields in WordPress comment form?
Use the following code snippet:
add_filter( 'comment_form_defaults', 'my_comment_form_defaults' );
/**
* Customize the text prior to the comment form fields.
* @param array $defaults
* @return $defaults
*/
function my_comment_form_defaults( $defaults ) {
$defaults['comment_notes_before'] = '<p class="comment-notes">'. __( 'Your email address will not be published. Required fields are marked *', 'my-text-domain' ).'</p>';
return $defaults;
}
Change/set your desired text in the above.
One of the several ways in which this code can be added is as a new Snippet when using the Code Snippets plugin. Set the code to appear on frontend only.
Session expired
Please log in again. The login page will open in a new tab. After logging in you can close it and return to this page.
Comments
Provide a URL of your site/webpage if something is not working.