Support » Fixing WordPress » I’ve broken the “commenting” function in my theme

  • Resolved kenwinstoncaine

    (@kenwinstoncaine)


    This is only happening in my chosen theme. Kubrick works fine. So it’s not techically a WordPress issue.

    If you go to any post at http://www.mindbodyspiritjournal.com, and click on “comments” in the metadata, you will be taken to the “single post” page. There will be no comment form on that page. And, if the post HAS existing comments, those will not be displayed.

    Any idea what code I have corrupted, and where?

    following code is on single.php’ and is lifted directly from the codex and WAS working for months:

    <p class="postmetadata">
    Posted in <?php the_category(', ') ?>
    <strong>|</strong>
    <?php edit_post_link('Edit','','<strong>|</strong>'); ?>
    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>

    Interestingly, on the ‘index’ page, the ‘comments’ shows up in the meta data. It does not on the ‘single post’ pages.

    I am running 2.05 right now.

    Also, interestingly, trackbacks still show up. Actual comments do not.

    I have massively customized my theme, so doing a reinstall is not a simple or pain-free solution. It may be the only choice. But I’m hoping someone can point me to what might be happening — why clicking on the ‘comments’ link doesn’t actually call a comments form or show existing comments.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • kenwinstoncaine

    (@kenwinstoncaine)

    Update:

    Just read the codex again and changed out that coding. Replaced it on ‘single.php’ with:

    <p class="postmetadata alt">
    <small>
    This entry was posted on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
    and is filed under <?php the_category(', ') ?>.
    You can follow any responses to this entry through
    the <?php comments_rss_link('RSS 2.0'); ?> feed.
    <?php
    if (('open' == $post->comment_status) && ('open' == $post->ping_status)) {
    // Both Comments and Pings are open
    ?>
    You can <a href="#respond">leave a response</a>, or
    <a href="<?php trackback_url(display); ?>">trackback</a>
    from your own site.
    <?php
    } elseif (!('open' == $post->comment_status) && ('open' == $post->ping_status)) {
    // Only Pings are Open
    ?>
    Responses are currently closed, but you can
    <a href="<?php trackback_url(display); ?> ">trackback</a>
    from your own site.
    <?php
    } elseif (('open' == $post->comment_status) && !('open' == $post->ping_status)) {
    // Comments are open, Pings are not
    ?>
    You can skip to the end and leave a response. Pinging is currently not allowed.
    <?php
    } elseif (!('open' == $post->comment_status) && !('open' == $post->ping_status)) {
    // Neither Comments, nor Pings are open
    ?>
    Both comments and pings are currently closed.
    <?php
    }
    edit_post_link('Edit this entry.','',''); ?>
    </small>
    </p>

    But… same result.

    No comment form. No existing comments showing up.

    The problem was indeed with the single.php and had something to do with my ommitting the comment about bonsai.

    By replacing the single.php file with a fresh version from the theme, I have full functionality again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I’ve broken the “commenting” function in my theme’ is closed to new replies.