Forked from braddalton/Add New Comment Form Field & Label.php
Last active
August 29, 2015 14:18
-
-
Save khikrama/b5ee35aa0ca2152e0c64 to your computer and use it in GitHub Desktop.
This file contains 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
function add_new_comment_form_field($fields) { | |
$fields['phone'] = '<p class="comment-form-phone"><label for="phone">' . __( 'Phone', 'wpsites.net' ) . '</label>' . | |
'<input id="url" name="url" type="text" placeholder="E.T Phone Home Please" value="' . | |
esc_attr( $commenter['comment_author_phone'] ) . '" size="30" /></p>'; | |
return $fields; | |
} | |
add_filter('comment_form_default_fields','add_new_comment_form_field'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Only add new comment field in wordpress . this function need to added in functions.php