• smerge

    (@smerge)


    Unable to enable comments on my posts. I am a beginner.I have double checked every php file, but the comments form or “leave a comment”links wont appear on the webpage. I also have comments on through the admin panel for every post.

    Please help!

    Here’s my index.php:

    <?php get_header(); ?>
    <div id=”container”>
    <div id=”content” class=”hfeed”>
    <?php the_post(); ?>

    <div id=”post-<?php the_ID(); ?>” class=”<?php merge_post_class(); ?>”>
    <h2 class=”entry-title”><?php the_title(); ?></h2>
    <div class=”entry-content”>
    <?php the_content(‘<span class=”more-link”>’.__(‘Read More’, ‘merge’).'</span>’); ?>

    <?php link_pages(‘<div class=”page-link”>’.__(‘Pages: ‘, ‘merge’), “</div>\n”, ‘number’); ?>
    </div>
    <div class=”entry-meta”>
    <?php printf(__(‘This was written by %1$s. Posted on <abbr class=”published” title=”%2$sT%3$s”>%4$s at %5$s</abbr>. Filed under %6$s. Bookmark the permalink. Follow comments here with the RSS feed.’, ‘sandbox’),
    ‘<span class=”vcard”><span class=”fn n”>’ . $authordata->display_name . ‘</span></span>’,
    get_the_time(‘Y-m-d’),
    get_the_time(‘H:i:sO’),
    the_date(‘l, F j, Y,’, ”, ”, false),
    get_the_time(),
    get_the_category_list(‘, ‘),
    get_permalink(),
    wp_specialchars(get_the_title(), ‘double’),
    comments_rss() ) ?>
    <?php if ((‘open’ == $post-> comment_status) && (‘open’ == $post->ping_status)) : // COMMENTS & PINGS OPEN ?>
    <?php printf(__(‘Post a comment or leave a trackback.’, ‘merge’), get_trackback_url()) ?>
    <?php elseif (!(‘open’ == $post-> comment_status) && (‘open’ == $post->ping_status)) : // PINGS ONLY OPEN ?>
    <?php printf(__(‘Comments are closed, but you can leave a trackback.’, ‘merge’), get_trackback_url()) ?>
    <?php elseif ((‘open’ == $post-> comment_status) && !(‘open’ == $post->ping_status)) : // COMMENTS OPEN ?>
    <?php printf(__(‘Trackbacks are closed, but you can post a comment.’, ‘merge’)) ?>

    <?php endif; ?>

    <?php edit_post_link(__(‘Edit this entry.’, ‘merge’),”,”); ?>
    </div>
    <!– <?php trackback_rdf(); ?> –>
    </div>

    <div id=”nav-below” class=”navigation”>
    <div class=”nav-previous”><?php previous_post_link(__(‘‹ %link’, ‘merge’)) ?></div>
    <div class=”nav-next”><?php next_post_link(__(‘%link ›’, ‘merge’)) ?></div>
    </div>

    </div>
    </div>

    <?php get_footer(); ?>

The topic ‘where does the “comments code go” in index.php?’ is closed to new replies.