Move Comment Form on Top of Comments in Suffusion
Feb 082014
A question from Suffusion Forum ask how to move the comment form before the comments in Suffusion. The answer come from Sayontan and is also in the original topic – a block of code need to be moved in comments.php – but people need clarifications about the exact position where the code need to be.
So, as Sayontan said, copy comments.php in your child theme and edit the copy. Look for this code:
1 2 3 4 5 6 7 8 9 10 11 |
// Begin Comments & Trackbacks if ( have_comments() ) { ?> <h3 class="comments"> printf(__('%1$s to “%2$s”', "suffusion"), comments_number(__('No Responses', "suffusion"), __('One Response', "suffusion"), __('% Responses', "suffusion")), get_the_title($post->ID));?> </h3> suffusion_split_comments(); suffusion_list_comments(); suffusion_comment_navigation(); // End Comments } |
Move this code right after the last “);” of the code for comment form showed below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
comment_form( apply_filters('suffusion_comment_form_fields', array( 'fields' => array( 'author' => $author_field, 'email' => $email_field, 'url' => $url_field, ), 'comment_field' => $comment_field, ' .wp_logout_url(apply_filters('the_permalink', get_permalink($post->ID))).'">'.__('Log out', 'suffusion').'.'.'', 'must_log_in' => ' ' . '.wp_login_url(apply_filters('the_permalink', get_permalink($post->ID))).'">'.__('You must be logged in to post a comment.', 'suffusion').'', 'title_reply' => ' '.__('Leave a Reply', "suffusion"), 'title_reply_to' => __('Leave a Reply to %s', "suffusion"), 'label_submit' => __('Submit Comment', "suffusion"), 'comment_notes_before' => apply_filters('suffusion_before_comment_form', ""), 'comment_notes_after' => apply_filters('suffusion_after_comment_form', '.sprintf(__('You may use these HTML tags and attributes: %s', 'suffusion'), ' ' .allowed_tags().'').''), 'cancel_reply_link' => __('Cancel reply', 'suffusion'), ) ) ); |
Can download the changed file from here and just upload it in your child theme root folder: Download changed comments.php