Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Modifying the Genesis 2.0 Comment Box
* Customize The Comment Form
* @author Matt Vaden
* link
add_filter( 'comment_form_defaults', 'maj_custom_comment_form' );
function maj_custom_comment_form($fields) {
$fields['comment_notes_before'] = '<div class="comment-policy-box">' .
'<p class="comment-policy">' .
'I\'m very glad you have chosen to leave a comment on my humble site. Please keep in mind that all comments are moderated according to my <a href="/comment-policy/" title="Matt\'s Affiliate Journey - Official Commenting Policy">official commenting policy</a>. Please Do NOT use keywords in the name field because they won\'t be linked to anything anyway...just use your real name. Let\'s try to have a personal and meaningful conversation.' .
'</p>' .
'</div>'; //Adds a customized Comment Policy Notification
$fields['title_reply'] = __( 'Share Your Comments & Feedback:', 'customtheme' ); //Changes The Form Headline
$fields['label_submit'] = __( 'Share My Comment', 'customtheme' ); //Changes The Submit Button Text
$fields['comment_notes_after'] = '<p>' .
'<strong>Commenting Note(s):</strong><br />' .
'To insert code into comments, <strong>use: [php]code in here...[/php]</strong><br />' .
'Some HTML tags allowed: &lt;strong&gt;, &lt;em&gt;, &lt;del&gt;, etc. <strong>(Just don\'t overdo it, please!)</strong>' .
'</p>'; //Removes Form Allowed Tags Box
return $fields;
// Remove the URL field
add_filter('comment_form_default_fields', 'maj_remove_url_field');
function maj_remove_url_field($fields)
return $fields;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment