Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11838
    Bill Pagonas
    Member

    Hi Sakin,
    I have seen some previus topics and the only thing i have found about changing the text in comments is that i must now how to change the code(comments.php).
    Well i am not a master but these are my changes :

    $args = array(
    ‘title_reply’ => __( ‘Αφήστε σχόλιο’, ‘simplecatch’ ),
    ‘comment_notes_before’ => ”,
    ‘comment_field’ => ‘<label>’. __(‘Σχόλιο’,’simplecatch’) .'</label><textarea name=”comment” id=”comment” rows=”10″ tabindex=”4″></textarea>’,
    ‘label_submit’ => __( ‘Submit’,’simplecatch’ ),
    ‘comment_notes_after’ => ”,
    ‘fields’ => apply_filters( ‘comment_form_default_fields’, $fields )
    );

    comment_form($args);

    but nothing happened. Propably it’not the args that i must change. I would appreciated if you can tell me what variables i have to change. It’s essential to me as i am from Greece and i must have greek text. Thank you very much and i am sorry if my english are not perfect 🙂 .

    #11859
    Sakin
    Keymaster

    @Bill Pagonas:
    You need to build child then. Then create the file functions.php and add the following code.

    /**
     * Altering Comment Form Fields
     * @uses comment_form_default_fields filter
     */
    function simplecatch_comment_form_fields( $fields ) {
    	$req = get_option( 'require_name_email' );
    	$aria_req = ( $req ? " aria-required='true'" : '' );
    	
        $fields['author'] = '<label for="author">' . __('Name','simplecatch') . '</label><input type="text" class="text" placeholder="'.esc_attr__( 'Name', 'simplecatch' ) .'&nbsp;'. ( $req ? esc_attr__( '( required )', 'simplecatch' ) : '' ) .'" name="author"'. $aria_req .' />';
    	$fields['email'] = '<label for="email">' . __('Email','simplecatch') . '</label><input type="text" class="text" placeholder="'.esc_attr__( 'Email', 'simplecatch' ) .'&nbsp;'. ( $req ? esc_attr__( '( required )', 'simplecatch' ) : '' ) .'" name="email"'. $aria_req .' />';
    	$fields['url'] = '<label for="url">' . __('Website','simplecatch') . '</label><input type="text" class="text" placeholder="'.esc_attr__( 'Website', 'simplecatch' ) .'" name="url"'. $aria_req .' />';
    
        return $fields;
    } // simplecatch_comment_form_fields
    #11893
    Bill Pagonas
    Member

    Hi again,
    I did what you said and the result is that the code you told me to add in the functions.php appears in the top of the site with no other change in the comment form.
    here is the link http://www.focusblog.site40.net/

    #11900
    Sakin
    Keymaster

    @Bill Pagonas: Looks like you have added it differently. Let me contact you though email. Can you tell me the changes and then will send you child theme.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Change the text in comments form’ is closed to new replies.