WordPress.org

Forums

Comment form missing (6 posts)

  1. amanda1973
    Member
    Posted 10 years ago #

    After upgrading from WP1.2 to 1.5.2, none of my posts have a comment form. [Here's a sample page.]

    Spammers are having no problem commenting, though, because I'm getting one moderation request every three or four minutes.

    How do I get the comment form back?

  2. techwench
    Member
    Posted 10 years ago #

    In your theme file, you'll have to add:

    <?php comments_template(); ?>

    where you want the comments to go.

  3. amanda1973
    Member
    Posted 10 years ago #

    In the index.php file within the folder of the theme I'm using, the above line is already there. Does it need to be somewhere else?

    <div class="post">
    <h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    <div class="meta"><?php _e("Filed under"); ?> <?php the_category(); ?>&nbsp;by <?php the_author(); ?> — <?php the_time('m/d/Y'); ?> @ <?php the_time(); ?> <?php edit_post_link(); ?></div>
    <div class="storycontent">
    <?php the_content(); ?>
    </div>
    <div class="feedback">
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    </div>
    <!--
    <?php trackback_rdf(); ?>
    -->
    <?php comments_template(); ?> <---------
    </div>
    <?php endforeach; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    </div>

  4. techwench
    Member
    Posted 10 years ago #

    Do you also have a single.php and/or page.php? If you do, it'll need to go in there.

  5. amanda1973
    Member
    Posted 10 years ago #

    There's a page-new.php in wp-admin. Is that the one you mean? The entire document consists of the code below:

    <?php
    require_once('admin.php');
    $title = __('New Page');
    $parent_file = 'post.php';
    require_once('admin-header.php');

    get_currentuserinfo();
    ?>

    <?php if ( isset($_GET['saved']) ) : ?>
    <div class="updated"><p><strong><?php _e('Page saved.') ?> <a href="edit-pages.php"><?php _e('Manage pages'); ?> &raquo;</a></strong></p></div>
    <?php endif; ?>

    <?php
    if ($user_level > 0) {
    $action = 'post';
    get_currentuserinfo();
    //set defaults
    $post_status = 'static';
    $comment_status = get_settings('default_comment_status');
    $ping_status = get_settings('default_ping_status');
    $post_pingback = get_settings('default_pingback_flag');
    $post_parent = 0;
    $page_template = 'default';

    include('edit-page-form.php');
    }
    ?>

    <?php include('admin-footer.php'); ?>

  6. techwench
    Member
    Posted 10 years ago #

    No, don't edit anything in wp-admin. Or in wp-includes, for that matter.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.