Support » Fixing WordPress » Comment form is not displayed

  • Resolved jyx34


    When viewing an individual post on my blog the comments form is not displayed. Clicking on the Comments link at the bottom just reloads the page, but there is no way to enter a comment.

    Please note this is a different problem from the many topics that have trouble submitting a comment. In this case no comment can be submitted since there is no form.

    I have changed to many different themes. The problem is present on all themes. I’ve deactivated all plugins, which has no effect. I just upgraded from 2.1 to 2.2 without any change.

    I’m no PHP expert, but presumably the comments_template() function in single.php is returning without writing the form or is otherwise broken.

    Here’s a link from the blog. Try clicking the comment link at the bottom:

    Any hints great appreciated! Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • OK, it’s more or less fixed, though I basically hacked it back together. I have no idea what got so futzed up even with a fresh install and a freshly loaded default theme with no activated plugins.

    I basically had to put a call to comments_template(); into archive.php, and then comment out a line in that function that was returning without displaying the comments and form. Oh, and I had to manually fix the inconsistent link anchors for the comments section.

    I’m sure this is technically wrong since I altered the function so it always displays the comments instead of fixing the underlying problem (which I never discovered). But it works now. If anyone has insight into the underlying problem feel free to post it. Otherwise my hack will have to do.

    I assume that happened because you are using a very custom (and insufficient) permalink structure, namely:
    WP “percieves” it as a daily archive not as single post! – and, of course, doesn’t want to display the comment form, which is due only on single post view.

    I bet if you revert back to an unhacked version AND change your permalink structure to something that has either the post title or post ID… it will work.

    Ah, the permalink structure. Yes, that’s the one thing that persisted through all my changes, and was responsible for the comments link not working. I guess I should have realized that from looking at the code, but never having worked with PHP before it was slow reading.

    I just changed to the “Date and name based” permalink structure, backed out my changes, and it works perfectly.

    Thanks for the tip!

    I have mine at the Dane and name based structure, but I have the same problem on my blog.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Comment form is not displayed’ is closed to new replies.