Created
September 27, 2018 10:33
-
-
Save zainaali/a899cd1bddc6a3b0b32c8c85707ab8d9 to your computer and use it in GitHub Desktop.
Add class and placeholder to name and email field of Wordpress comment template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fields = array( | |
'author' => '<ul class="row"><li class="col-sm-6"><label>' . '<input class="form-control" id="author" name="author" type="text" placeholder="' . esc_attr__( "Name", "text-domain" ) . '" value="' . esc_attr( $commenter['comment_author'] ) . '" size=""' . $aria_req . ' /></label></li>', | |
'email' => '<li class="col-sm-6"><label>' . '<input class="form-control" name="email" type="text" placeholder="' . esc_attr__( "Email", "text-domain" ) . '" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size=""' . $aria_req . ' /></label></li>', | |
); | |
comment_form(array('fields'=>$fields)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment