Add Message or Comment Note Before WordPress Comments

If you want to add a message or comment note that will be visible to all users who are leaving a comment on your WordPress site, you can try the code below :

function ogbongeblog_comment_text($arg) {
  $arg['comment_notes_before'] = "We're glad you have chosen to leave a comment. Please keep in mind that comments are moderated according to our <a href='https://www.ogbongeblog.com/comment-policy'>comment policy</a>. Your email address is required but will not be published. No keyword stuffing in the name field and commenting from blah blah blah makes no sense";   
  return $arg;
}
add_filter('comment_form_defaults', 'ogbongeblog_comment_text');

Add the code in your theme’s functions.php file.

The code will simply replace the default comment form before notes.

wordpress-comment-note-before-comments

Remember to change the URL accordingly, so it goes to your comment policy page rather than ogbongeblog.com :slight_smile:

You can steal our comment policy page though and modify it to meet your needs. :wink:

Enjoy!

1 Like

I would try this out!

Nice one bro… And who said I’ll not copy this your comment policy??? Lol :joy: :joy:.

BTW that “commenting from blah bla blah ” crap. got me rolling… Those people no dey carry last ooo… Hehehe.

But I’m still waiting patiently for the other stuff you said you’ll post on the planet :waxing_gibbous_moon:

Anytime I edit my function.php my website will go offline, the homepage goes error.

maybe bad formatting…

2 Likes