WordPress.org

Ready to get started?Download WordPress

Forums

[1.5] Comments not showing when viewing single post (47 posts)

  1. philpeeps
    Member
    Posted 9 years ago #

    As stated, when viewing a single post, the comments to my post do not show up. Any ideas? This is a template I use for 1.2 that I am porting to 1.5 and this looks to be my last hump to moving it over to my main site...

    http://www.philpeeps.com/wp/
    http://www.philpeeps.com/wp15/

  2. lawtai
    Member
    Posted 9 years ago #

    the same thing happened to me as well. I'm guessing you're using your own template from 1.2 and bringing it to 1.5. I did the same thing and had the same problem, so I copied the comments.php and comments-popup.php from the classic theme over to my own theme and that solved the problem.

  3. philpeeps
    Member
    Posted 9 years ago #

    thanks! worked great! I can't wait till I have some time to convert fully....

  4. davincim
    Member
    Posted 9 years ago #

    The same thing is happening to me. I just upgraded to 1.5 last night and since then there's no way to leave a comment. I, too, have checked the "Allow people to post comments on the article".

    Before I try the above solution, I'd like to know WHY it solves the problem, and is it the best solution? I've made a few changes to my previous version of comments.php (which I've verified is the name of the file), so if I can avoid copying changes over to another file, that would be great.

  5. shan
    Member
    Posted 9 years ago #

    I'm having the same issues, but I'm still really confused about what I need to do. Can someone please try to explain it for me one more time. :)

  6. Nick Momrik
    Member
    Posted 9 years ago #

    Have you changed the name of your old wp-comments.php to comments.php for the new theme structure?

  7. davincim
    Member
    Posted 9 years ago #

    Yes, I have.

  8. Nick Momrik
    Member
    Posted 9 years ago #

    And did you update for this?

    <?php comments_template(); ?>

  9. davincim
    Member
    Posted 9 years ago #

    Not sure what you mean. I probably did, but where exactly is that change, and I'll go and check.

  10. Nick Momrik
    Member
    Posted 9 years ago #

    Depends on the files in your theme. In mine, it's in a single.php file. If you simply made some changes to your old 1.2 template, it might be inside index.php.

  11. davincim
    Member
    Posted 9 years ago #

    Oh yes, I see it now. The instructions said to change that in my index.php. So yes, that line is in there.

  12. Nick Momrik
    Member
    Posted 9 years ago #

    How about a link to your site?

  13. davincim
    Member
    Posted 9 years ago #

    http://www.familywebwatch.com/blog

    Thanks for helping. :)

  14. Nick Momrik
    Member
    Posted 9 years ago #

    If I look at the source of a single post page I see this....

    <!-- B4 upgrade
    <b>Warning</b>: main(/hsphere/local/home/galen5/familywebwatch.com/blog/wp-comments.php): failed to open stream: No such file or directory in <b>/hsphere/local/home/galen5/familywebwatch.com/blog/wp-content/themes/Carrots/index.php</b> on line <b>182</b>

    <b>Warning</b>: main(/hsphere/local/home/galen5/familywebwatch.com/blog/wp-comments.php): failed to open stream: No such file or directory in <b>/hsphere/local/home/galen5/familywebwatch.com/blog/wp-content/themes/Carrots/index.php</b> on line <b>182</b>

    <b>Warning</b>: main(): Failed opening "/hsphere/local/home/galen5/familywebwatch.com/blog/wp-comments.php" for inclusion (include_path=".:/usr/local/lib/php") in <b>/hsphere/local/home/galen5/familywebwatch.com/blog/wp-content/themes/Carrots/index.php</b> on line <b>182</b>
    -->

    Something is still looking for wp-comments.php.

    Maybe you could post the actual PHP code from your file here and post back with the link to it.

  15. davincim
    Member
    Posted 9 years ago #

    Odd. Here's the code to my index.php.

  16. Nick Momrik
    Member
    Posted 9 years ago #

    Try changing all calls in the file from $single to is_single()

  17. Nick Momrik
    Member
    Posted 9 years ago #

    Actually, that part is working fine after I look again.
    Comment this line out fully by changing
    <!-- B4 upgrade <?php include(ABSPATH . 'wp-comments.php'); ?> -->
    to
    <!-- B4 upgrade <?php //include(ABSPATH . 'wp-comments.php'); ?> -->

    comments_template isn't finding your comments.php file. Are you sure you have a comments.php file inside your theme folder?

  18. Nick Momrik
    Member
    Posted 9 years ago #

    Also, just curious, is there a reason you don't just use the version of Kubrick that ships with WP 1.5? It looks like the only thing you've modified is your header image and some of the colors.

  19. Nick Momrik
    Member
    Posted 9 years ago #

    Ok, I checked and the file is there....must be something in that file. Can you do the same and post that file up to that site?

  20. davincim
    Member
    Posted 9 years ago #

    Okay, I added the // to the line you mentioned above. Uploaded index.php and still got the same result.

    Yes, I can confirm that there is a comments.php file in my theme folder, but to be more specific it's in "themes > Carrots". That's the right place, right?

    And about your last question: true it's mostly changes to the header and colors; I've added some "blog" related images in the sidebar. I just had it in my head that I needed to use the theme I was originally using. But now that you mention it, I should probably just add my changes to the default Kubrick theme.

    So, do you suggest that I make those changes to the default theme instead of using my own and see what happens, or is there anything else I should be looking for?

  21. Nick Momrik
    Member
    Posted 9 years ago #

    Can I have a look at comments.php first (post it up to that same site)? Might be something really simple.

  22. roobottom
    Member
    Posted 9 years ago #

    okay, i'm getting the same problem...

    http://www.roobottom.com/diary/

    i'm using the default comments.php and comment-popup.php, but to no avail. Is there a tag you're supposed to include to get the comments working?

  23. davincim
    Member
    Posted 9 years ago #

  24. davincim
    Member
    Posted 9 years ago #

    Oh, think I saw something. Look at line 2. Is that where the problem is?

  25. Nick Momrik
    Member
    Posted 9 years ago #

    roobottom,
    You need a call to
    <?php comments_template(); ?>
    in index.php or single.php or whatever file you are using to show your single post pages.

  26. davincim
    Member
    Posted 9 years ago #

    Well, I guess that would be the index.php file because I haven't made any changes to single.php. If you agree, where do I place <?php comments_template(); ?>?

    And I take it line 2 wasn't a concern?

  27. Nick Momrik
    Member
    Posted 9 years ago #

    davincim,
    It should be:
    if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))

    But that wouldn't cause your problem. That just makes it so you can't load the file directly, so you'll want to change it though.

    You shouldn't need lines 20-25.

  28. Nick Momrik
    Member
    Posted 9 years ago #

    My previous post was for roobottom.

  29. davincim
    Member
    Posted 9 years ago #

    MtDewVirus,

    Sorry, you lost me. You want me to delete (or probably comment out) lines 20-25 in which file?

    And you want me to add or change if ("comments.php" == basename($_SERVER["SCRIPT_FILENAME"])) in that same file? And if so, where?

    Thanks.

  30. Nick Momrik
    Member
    Posted 9 years ago #

    comments.php

    Change line 2 so that it's using the right filename (it has wp-comments.php).

    Yes, comment out lines 20-25 and see if anything changes.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.