Comments don't show up

  • Author
    Posts
  • #1339574

    annejanssen1
    Member

    I’m working on this website: http://www.readyscholar.co.uk, with theme Hafniumicy, and unfortunately, my comments don’t show up. See for example the page http://readyscholar.co.uk/about-me/

    The comments are visible and approved in the back-end, but on the pages, the new (or existing) comments don’t appear.

    When I switched to Twentyten, they did appear, so it must be theme specific.

    This is the code of my comments.php file:

    <?php
    if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) {
    die ('Please do not load this page directly. Thanks!');
    }
    ?>

    <?php if (comments_open()) : ?>


    <div class="post-box post-box-replies post-box-comments">
    <div class="title">
    <h2><?php echo __('Comments', PADD_THEME_SLUG); ?></h2>
    <p><?php echo __('Tell us what do you think.', PADD_THEME_SLUG); ?></p>
    </div>
    <div class="interior post-box-comments-interior">
    <?php if (post_password_required()) : ?>
    <p class="no-comments"><?php echo __('This post is password protected. Enter the password to view comments.', PADD_THEME_SLUG); ?></p>
    <?php elseif (!empty($comments_by_type['comment'])) : ?>
    <ol class="comments-list">
    <?php wp_list_comments('type=comment&callback=padd_theme_single_comments'); ?>

    <?php else : ?>
    <p class="no-comments"><?php echo __('There are no comments on this entry.', PADD_THEME_SLUG); ?></p>
    <?php endif; ?>
    </div>
    </div>


    <div class="post-box post-box-reply" id="reply">
    <div class="title post-box-reply-title append-clear">
    <h2><?php comment_form_title('Add a Comment', 'Add a Comment to %s'); ?></h2>
    <p><?php echo __('Fill in the form and submit.', PADD_THEME_SLUG); ?></p>
    </div>
    <div class="interior post-box-reply-interior">
    <?php if (get_option('comment_registration') && !is_user_logged_in()) : ?>
    <p>You must be ">logged in to post a comment.</p>
    <?php else : ?>
    <form action="<?php echo bloginfo('wpurl'); ?>/wp-comments-post.php" method="post" id="comment-form">
    <?php if ( is_user_logged_in() ) : ?>
    <p>Logged in as /wp-admin/profile.php"><?php echo $user_identity; ?>. " title="Log out of this account">Log out »</p>
    <?php else : ?>
    <p class="input input-small input-name">
    <label for="comment-author"><?php echo __('Name', PADD_THEME_SLUG); ?>: <small><?php if ($req) echo __("(Required)", PADD_THEME_SLUG); ?></small></label>
    <span><input type="text" name="author" id="comment-author" value="<?php echo '' != esc_attr($comment_author) ? esc_attr($comment_author) : ''; ?>" size="22" tabindex="1" /></span>
    </p>
    <p class="input input-small input-email">
    <label for="comment-email"><?php echo __('E-mail', PADD_THEME_SLUG); ?>: <small><?php if ($req) echo __("(Required)", PADD_THEME_SLUG); else echo __("(Optional)", PADD_THEME_SLUG); ?></small></label>
    <span><input type="text" name="email" id="comment-email" value="<?php echo '' != esc_attr($comment_author_email) ? esc_attr($comment_author_email) : ''; ?>" size="22" tabindex="2" /></span>
    </p>
    <p class="input input-website">
    <label for="comment-url"><?php echo __('Website', PADD_THEME_SLUG); ?>: <small><?php echo __("(Optional)", PADD_THEME_SLUG); ?></small></label>
    <span><input type="text" name="url" id="comment-url" value="<?php echo '' != esc_attr($comment_author_url) ? esc_attr($comment_author_url) : ''; ?>" size="22" tabindex="3" /></span>
    </p>
    <?php endif; ?>
    <p class="inpit">
    <label for="comment-comment"><?php echo __('Comments', PADD_THEME_SLUG); ?>:</label>
    <span><textarea name="comment" id="comment-comment" cols="22" rows="5" tabindex="4"></textarea></span>
    </p>
    <div class="comment-notify-submit">
    <?php
    if (function_exists('show_subscription_checkbox')) {
    show_subscription_checkbox();
    }
    ?>
    <p class="comment-submit">
    <button type="submit" name="submit" value="submit" id="comment-submit" tabindex="5" ><span><?php echo __('Submit', PADD_THEME_SLUG); ?></span></button>
    <small><?php cancel_comment_reply_link(); ?></small>
    </p>
    <div class="clear"></div>
    </div>
    <?php comment_id_fields(); ?>
    <?php do_action('comment_form', $post->ID); ?>
    </form>
    <?php endif; ?>
    </div>
    </div>

    <?php endif; ?>

    I’m not a php-expert, but maybe one of you can see if something’s wrong? Any help appreciated!

    #1339678

    annejanssen1
    Member

    Now with returns:

    <?php
    if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) {
    die ('Please do not load this page directly. Thanks!');
    }
    ?>

    <?php if (comments_open()) : ?>


    <div class="post-box post-box-replies post-box-comments">
    <div class="title">
    <h2><?php echo __('Comments', PADD_THEME_SLUG); ?></h2>
    <p><?php echo __('Tell us what do you think.', PADD_THEME_SLUG); ?></p>
    </div>
    <div class="interior post-box-comments-interior">
    <?php if (post_password_required()) : ?>
    <p class="no-comments"><?php echo __('This post is password protected. Enter the password to view comments.', PADD_THEME_SLUG); ?></p>
    <?php elseif (!empty($comments_by_type['comment'])) : ?>
    <ol class="comments-list">
    <?php wp_list_comments('type=comment&callback=padd_theme_single_comments'); ?>

    <?php else : ?>
    <p class="no-comments"><?php echo __('There are no comments on this entry.', PADD_THEME_SLUG); ?></p>
    <?php endif; ?>
    </div>
    </div>


    <div class="post-box post-box-reply" id="reply">
    <div class="title post-box-reply-title append-clear">
    <h2><?php comment_form_title('Add a Comment', 'Add a Comment to %s'); ?></h2>
    <p><?php echo __('Fill in the form and submit.', PADD_THEME_SLUG); ?></p>
    </div>
    <div class="interior post-box-reply-interior">
    <?php if (get_option('comment_registration') && !is_user_logged_in()) : ?>
    <p>You must be ">logged in to post a comment.</p>
    <?php else : ?>
    <form action="<?php echo bloginfo('wpurl'); ?>/wp-comments-post.php" method="post" id="comment-form">
    <?php if ( is_user_logged_in() ) : ?>
    <p>Logged in as /wp-admin/profile.php"><?php echo $user_identity; ?>. " title="Log out of this account">Log out »</p>
    <?php else : ?>
    <p class="input input-small input-name">
    <label for="comment-author"><?php echo __('Name', PADD_THEME_SLUG); ?>: <small><?php if ($req) echo __("(Required)", PADD_THEME_SLUG); ?></small></label>
    <span><input type="text" name="author" id="comment-author" value="<?php echo '' != esc_attr($comment_author) ? esc_attr($comment_author) : ''; ?>" size="22" tabindex="1" /></span>
    </p>
    <p class="input input-small input-email">
    <label for="comment-email"><?php echo __('E-mail', PADD_THEME_SLUG); ?>: <small><?php if ($req) echo __("(Required)", PADD_THEME_SLUG); else echo __("(Optional)", PADD_THEME_SLUG); ?></small></label>
    <span><input type="text" name="email" id="comment-email" value="<?php echo '' != esc_attr($comment_author_email) ? esc_attr($comment_author_email) : ''; ?>" size="22" tabindex="2" /></span>
    </p>
    <p class="input input-website">
    <label for="comment-url"><?php echo __('Website', PADD_THEME_SLUG); ?>: <small><?php echo __("(Optional)", PADD_THEME_SLUG); ?></small></label>
    <span><input type="text" name="url" id="comment-url" value="<?php echo '' != esc_attr($comment_author_url) ? esc_attr($comment_author_url) : ''; ?>" size="22" tabindex="3" /></span>
    </p>
    <?php endif; ?>
    <p class="inpit">
    <label for="comment-comment"><?php echo __('Comments', PADD_THEME_SLUG); ?>:</label>
    <span><textarea name="comment" id="comment-comment" cols="22" rows="5" tabindex="4"></textarea></span>
    </p>
    <div class="comment-notify-submit">
    <?php
    if (function_exists('show_subscription_checkbox')) {
    show_subscription_checkbox();
    }
    ?>
    <p class="comment-submit">
    <button type="submit" name="submit" value="submit" id="comment-submit" tabindex="5" ><span><?php echo __('Submit', PADD_THEME_SLUG); ?></span></button>
    <small><?php cancel_comment_reply_link(); ?></small>
    </p>
    <div class="clear"></div>
    </div>
    <?php comment_id_fields(); ?>
    <?php do_action('comment_form', $post->ID); ?>
    </form>
    <?php endif; ?>
    </div>
    </div>

    <?php endif; ?>

    #1339679

    annejanssen1
    Member

    Sorry, that doesn’t seem to work.

    #1339692

    raincoaster
    Member

    You are in the wrong forum. You need to be at WordPress.ORG for help with that version of the software.

    #1339695

    annejanssen1
    Member

    Ok thanks.

The topic ‘Comments don't show up’ is closed to new replies.