Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * frontpage-comments.php
- * to show comment form on front page
- */
- ?>
- <div class="frontpage-comments">
- <?php if ( post_password_required() ) : ?>
- <p class="nopassword"><?php 'This post is password protected. Enter the password to add comments.'; ?></p>
- </div><!-- .frontpage-comments -->
- <?php
- /* Stop the rest of comments.php from being processed,
- * but don't kill the script entirely -- we still have
- * to fully load the template.
- */
- return;
- endif;
- ?>
- <?php // You can start editing here -- including this comment! ?>
- <?php if ( have_comments() ) : ?>
- <p class="comments-title">
- <a href="<?php the_permalink(); ?>#comments">Click to read the existing <?php echo ((get_comments_number()==1)?' comment':get_comments_number().' comments'); ?><?php if ( comments_open() ) echo ' before commenting'; ?>.</a><?php if ( comments_open() ) echo ' Or comment directly below:'; else echo ' Comments are closed.'; ?>
- </p>
- <?php
- /* If there are no comments and comments are closed, let's leave a little note, shall we?
- * But we don't want the note on pages or post types that do not support comments.
- */
- elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) :
- ?>
- <p class="nocomments"><?php 'Comments are closed.'; ?></p>
- <?php endif; ?>
- <?php comment_form(); ?>
- </div><!-- .frontpage-comments -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement