I’ve put the class for 'logged_in_as' into another container to display the content in another column:

    <div id="content-form">


         $fields =  array(

            'author' => '<div class="right_col"><p class="comment-form-author">
                            <input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
            'email'  => '<p class="comment-form-email">
                            <input id="email" name="email" type="text" value="Name' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
            'url'    => '<p class="comment-form-url">
                            <input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p></div>',

        comment_form( array(

           'label_submit' => 'Beitrag kommentieren', 
           'title_reply' => '', 
           'fields' => apply_filters( 
              'comment_form_default_fields', $fields ), 
           'comment_notes_before' => '', 
           'comment_notes_after' => '',
           'logged_in_as' => '<div class="right_col"><p class="logged-in-as">' 
                                . sprintf( 
                                      __( 'Logged in as <a href="%s">%s</a> . 
                                           <a href="%s" title="Log out of this account">Log out?</a></p></div>' 
                                      , admin_url( 'profile.php' )
                                      , $user_identity
                                      , wp_logout_url( apply_filters( 'the_permalink'
                                                                      , get_permalink( $post_id ) 



But the submit-button for the comment-field (which is in the left column) only displays after the content of 'logged_in_as'. screenshot of the comment-form

But I want to place the submit-button on the left side below the comment-field. How can I place the Submit-Button before the 'logged_in_as'-Content?

  • 1
    Hi, I’ve edited my question. Maybe it was a bit confusing. But I just want to know, if there is a way to change the order. – Nitzki Aug 28 '12 at 9:22
  • I've edited your code for legibility - you'll be able to see it once the edit has been 'approved.' They way you had it formatted made it too hard to understand what it was doing. – marfarma Sep 11 '12 at 15:09
  • 1
    Thanks for your help. I’ve added the complete code for the comment_form. – Nitzki Sep 11 '12 at 17:30

You don't change the ordering, essentially. If you need to reposition things on the page, you should use CSS. That's what it's for.

The submit button is in a P with a class of form-submit. You can use that to move it around with CSS.

|improve this answer|||||
  • 1
    Sorry, I forgot a part of the code. – Nitzki Sep 11 '12 at 17:38
  • 1
    And I’v used T5 Comment Textarea On Top Plugin by toscho to make the textarea the first field of the comment form. – Nitzki Sep 11 '12 at 17:46
  • What is it that you can't do with just CSS? You can reposition and re-order fields on the page without changing their positions in the HTML, you know. – Otto Sep 11 '12 at 17:51
  • Hi Otto, yes, it was a css-problem. Thanks. I thought at first, there would be another solution via any php to reorder fields. Thanks! – Nitzki Sep 18 '12 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.