fields in the form comments

Viewing 2 posts - 1 through 2 (of 2 total)
  • #22667
    sm84
    Participant

    Tell me how to change the order of the fields in the form Comments
    Now
    1 comment
    2 name
    3 email
    4 site

    Necessary

    1 name
    2 email
    3 site
    4 comment

    #22668
    Daniel Tara
    Keymaster

    Add this code to your child theme’s functions.php file:

    function pinboard_child_comment_form_fields( $fields ) {
        $textarea = $fields['comment'];
        unset( $fields['comment'] );
        $fields['comment'] = $textarea;
        
        return $fields;
    }
    add_filter( 'comment_form_fields', 'pinboard_child_comment_form_fields' );
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.