Comments on Blaskan Theme – please help
-
Hello everyone. I am new to self hosted blogs, only put my new site up in the last week, though I’ve had a few ordinary WordPress sites before.
Info: bravenewworld.com.au, I am running the Blaskan theme, hosted through Panthur if it makes a difference
All was ok until I noticed the comment box appearing on my home page – a static page. I edited the comments.php (through instructions found on a wordpress forum) to remove the comment box and the text underneath from pages, however I believe I have taken out the ability to have comments on posts too* ??
(*rookie)I need to enable comments to appear on posts only – without all that ‘you can use html code blah blah’ at the bottom of the comments box. I just want it to say ‘Leave a comment’ and then have the comment box there for them to use, and previous comments to appear underneath.
If anyone can help – this is the current code that is filed under the comment.php now:
<section id="comments"> <?php if ( post_password_required() ) : ?> <p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'blaskan' ); ?></p> </section> <!-- /#comments --> <?php return; ?> <?php endif; ?> <?php if ( have_comments() ) : ?> <h1 id="comments-title"><?php printf( _n( __( 'One comment', 'blaskan' ), __( '%1$s comments', 'blaskan' ), get_comments_number(), 'blaskan' ), number_format_i18n( get_comments_number() ) ); ?></h1> <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> <nav class="post-nav" role="navigation"> <div class="previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'blaskan' ) ); ?></div> <div class="next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'blaskan' ) ); ?></div> </nav> <!-- / .post-nav --> <?php endif; ?> <ol id="comment-list"><?php wp_list_comments( array( 'callback' => 'blaskan_comment' ) ); ?></ol> <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> <footer> <nav class="post-nav" role="navigation"> <div class="previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'blaskan' ) ); ?></div> <div class="next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'blaskan' ) ); ?></div> </nav> <!-- / .post-nav --> </footer> <?php endif; ?> <?php else : ?> <?php if ( ! comments_open() && ! is_page() ) : ?> <p class="nocomments"><?php _e( 'Comments are closed.', 'blaskan' ); ?></p> <?php endif;?> <?php endif; // end have_comments() ?> <?php $commentform = array( 'fields' => apply_filters( 'comment_form_default_fields', array( 'author' => '<label for="comment-author">' . __( 'Name', 'blaskan' ) . ( $req ? ' <span class="required">' . __( '(required)', 'blaskan' ) . '</span>' : '' ) . '</label> ' . '<input id="comment-author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"'. ( $req ? ' aria-required="true"' : '' ) . '>', 'email' => '<label for="comment-email">' . __( 'Email', 'blaskan' ) . ( $req ? ' <span class="required">' . __( '(required - will be kept a secret)', 'blaskan' ) . '</span>' : '' ) . '</label> ' . '<input id="comment-email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"'. ( $req ? ' aria-required="true"' : '' ) . '>', 'url' => '<label for="comment-url">' . __( 'Website', 'blaskan' ) . '</label>' . '<input id="comment-url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30">' ) ), 'comment_field' => '<label for="comment">' . __( 'Comment', 'blaskan' ) . '</label>' . '<textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea>', 'must_log_in' => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.', 'blaskan' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( get_the_ID() ) ) ) ) . '</p>', 'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'You are logged in as <a href="%s">%s</a>. <a href="%s" title="Log out of this account">Log out?</a></p>', 'blaskan' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( get_the_ID() ) ) ) ), 'comment_notes_before' => null, 'comment_notes_after' => null, 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => __( 'Post a comment', 'blaskan' ), 'title_reply_to' => __( 'Leave a Reply to %s', 'blaskan' ), 'cancel_reply_link' => __( 'Cancel reply', 'blaskan' ), 'label_submit' => __( 'Post comment', 'blaskan' ), ); comment_form( $commentform ); ?> </section> <!-- / #comments -->
BTW I hope that I have used the code entering button correctly, excuse me if it hasn’t worked properly – I have seen how people don’t like lots of code on forum pages so am *trying* to do the right thing ?? [If I haven’t let me know how please.]
Any help would be greatly appreciated.
- The topic ‘Comments on Blaskan Theme – please help’ is closed to new replies.