Reply To: Change the text of the feedback form
Home › Forums › Main Forum › Theme Suggestion Box › Change the text of the feedback form › Reply To: Change the text of the feedback form
December 7, 2015 at 1:14 pm
#16864
Moderator
Hi jose,
Add this following code on functions.php file of child theme. Here you just need to find string and edit them as your requirement.
/**
* Custom author form field for the comments form
*/
function celestial_comment_form_field_author_child( $html ) {
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
return '
' . '';
}
add_filter( 'comment_form_field_author', 'celestial_comment_form_field_author_child',999);
/**
* Custom HTML5 email form field for the comments form
*/
function celestial_comment_form_field_email_child( $html ) {
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
return '
';
}
add_filter( 'comment_form_field_email', 'celestial_comment_form_field_email_child',999);
/**
* Custom HTML5 url form field for the comments form
*/
function celestial_comment_form_field_url_child( $html ) {
$commenter = wp_get_current_commenter();
return '
';
}
add_filter( 'comment_form_field_url', 'celestial_comment_form_field_url_child', 999);
/**
* Filters comments_form() default arguments
*/
function celestial_comment_form_default_child( $defaults ) {
return wp_parse_args( array(
'comment_field' => '',
'comment_notes_before' => '',
'comment_notes_after' => '',
'title_reply' => '',
'title_reply_to' => '',
'must_log_in' => '' . sprintf( __( 'You must be logged in to post a comment.', 'celestial' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( get_the_ID() ) ) ) ) . '',
'logged_in_as' => '',
'label_submit' => __( 'Post child Comment' )
), $defaults );
}
add_filter( 'comment_form_defaults', 'celestial_comment_form_default_child', 999 );
Note: please use child theme to add this code, otherwise your changes will be lost on theme update.
Thanks
Recommended Hosting