Support » Theme: SongWriter » Move Comment Box Above Comments

  • Resolved jenniferpeaslee

    (@jenniferpeaslee)


    Hello, I asked this comment in the main support group and was told to post it here instead.

    I use the Songwriter theme on my website (http://thesavingsopportunity.com) and I was wondering if there is a way to move the comment box up above the comments.

    On one of my posts in particular I got a lot of comments and someone mentioned being annoyed by having to scroll so far down on their phone to find the comment box. I don’t usually get many comments but if this is an easy fix I’d love to do it.

    I’m a new blogger and new to WordPress so I need some help and someone to walk me through it – or if it’s too hard, for someone to tell me so and I’ll just move on, no biggie. Thanks in advance for your help!

    – Jennifer

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author TT Themes

    (@tomastoman)

    Dear Jennifer,

    to move the comment form above the list of comments, you will need to edit the “comments.php” template. Please search there for the following code:

    <?php $placeholder_name = __( 'Your name' , 'songwriter' );
       $placeholder_web = __( 'Website' , 'songwriter' );
       $placeholder_comment = __( 'Comment...' , 'songwriter' );
       $aria_req = ( $req ? " aria-required='true'" : '' );
       $field_req = ( $req ? " *" : '' );
       $comment_args = array(
    'title_reply'=>__( 'Leave a Comment' , 'songwriter' ),
    'fields' => apply_filters( 'comment_form_default_fields', array(
    'author' => '<p class="comment-form-author">' . '<label for="author">' . __( '', 'songwriter' ) . '</label> ' . '<input id="author" name="author" type="text" placeholder="' . $placeholder_name . $field_req . '" value=""  size="30"' . $aria_req . ' /></p>',
    'email'  => '<p class="comment-form-email">' .
    '<label for="email">' . __( '', 'songwriter' ) . '</label> ' .
    '<input id="email" name="email" type="text" placeholder="E-mail' . $field_req .'" value="" size="30"' . $aria_req . ' />'.'</p>',
    'url'    => '<p class="comment-form-url">' .
    '<label for="url">' . __( '', 'songwriter' ) . '</label> ' .
    '<input id="url" name="url" type="text" placeholder="' . $placeholder_web . '" value="" size="30" />'.'</p>' ) ),
    'comment_field' => '<p>' .
    '<label for="comment">' . __( '', 'songwriter' ) . '</label>' .
    '<textarea id="comment" name="comment" cols="45" rows="8" aria-required="true" placeholder="' . $placeholder_comment . '"></textarea>' .
    '</p>',);
    comment_form($comment_args); ?>

    and move it just above this code:

    <ol class="commentlist">

    Then, I recommend you to place the following custom CSS into “Theme Options > Other Settings > Custom CSS”:

    #comments #respond {margin-top: 30px;}

    You can edit the “comments.php” file through the panel “Appearance > Editor”, but if you update the theme in the future, all your customizations may be lost. To avoid it, I recommend you to create a child theme instead of modifying the original theme.

    Or, instead of moving the comment form, you can simply paginate your comments to prevent scrolling so far down.

    Best regards,
    Tomas Toman

    Thank you! I have decided to paginate because it’s a simpler option – I don’t want to have to update the code every time there is an update, and it says pagination has the added benefit of speeding load times on posts with a lot of comments. Thanks again for your help!

    Theme Author TT Themes

    (@tomastoman)

    You are welcome!

    Best regards,
    Tomas Toman

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Move Comment Box Above Comments’ is closed to new replies.