Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save braddalton/6402153 to your computer and use it in GitHub Desktop.
Save braddalton/6402153 to your computer and use it in GitHub Desktop.
function modify_comment_form_fields($fields){
$fields['author'] = '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
'<input id="author" name="author" type="text" placeholder="Real name, please, no keyword spamming!" value="' . esc_attr( $commenter['comment_author'] ) . '" size="20"' . $aria_req . ' /></p>';
return $fields;
}
add_filter('comment_form_default_fields','modify_comment_form_fields');
.comment-form-author input {
background-color: #FFFFFF;
border: 1px solid #DDDDDD;
border-radius: 3px 3px 3px 3px;
box-shadow: 1px 1px 3px #EEEEEE inset;
color: #999999;
font-size: 1.4rem;
padding: 1.6rem;
width: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment