Change the text of the feedback form

Home Forums Main Forum Theme Suggestion Box Change the text of the feedback form

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16863

    Hello such, I need to change text that appears in the form of comments celestial theme, I text appears in English and I put it in my language in this case Spanish, can you tell me where the file.php to modify the text or tell me another simpler option. Thank you.

    #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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.