How to Change the Message Shown Before the Comments

By default when you launch a new website, your site’s WordPress comment form show this note before comment form.

Your email address will not be published. Required fields are marked *

How to change comment notes content before form?

Before:

This is default WordPress comment form note.

Default text before the comment form in WordPress

Just put below code into WordPress’s functions.php file and you are all set.

function crunchify_modify_text_before_comment_form($arg) {
    $arg['comment_notes_before'] = '<p class="comment-notes">' . __( 'We welcome relevant and respectful comments. Off-topic comments may be removed.' ) . '</p>';
    return $arg;
}
add_filter('comment_form_defaults', 'crunchify_modify_text_before_comment_form');

After:

This is modified WordPress comment form notes.

Modify text before the comment form in WordPress - comment_notes_before hook

How to remove notes before comment form?

Just use below code and put it in to WordPress’s functions.php file.

// remove all notes before comment form 
 
add_filter('comment_form_defaults', 'crunchify_remove_comments_notes');
function crunchify_remove_comments_notes($defaults)
{
    $defaults['comment_notes_before'] = '';
    return $defaults;
}
Completely remove notes before WordPress comment form

Similar article

The post How to modify the Notes Shown Before the WordPress Comment Form? appeared first on Crunchify.