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

#16864
Sushil Adhikari
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' => '' . __( 'Leave child a reply', 'celestial' ) . '', 'title_reply_to' => '' . __( 'Leave a reply to %s', 'celestial' ). '', 'must_log_in' => '', 'logged_in_as' => '
' . sprintf( __( 'Logged in as %2$s. Log out?', 'celestial' ), admin_url( 'profile.php' ), wp_get_current_user()->display_name, wp_logout_url( apply_filters( 'the_permalink', get_permalink( get_the_ID() ) ) ) ) . '
', '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