WordPress.org

Ready to get started?Download WordPress

Forums

Comment fields are gone (21 posts)

  1. Gurkah
    Member
    Posted 1 year ago #

    Hi!

    When I was setting up this website I must have managed to somehow delete something related to the comment fields. I've been looking all over but I can't find anything.

    The problem is, simply put, that when you click on 'Leave a comment' You get sent to the post but there are no boxes or fields where you can write your comment.

    Please help me with this, I don't know what else to do.

    here is the link to the blog: http://www.ulrikalidbo.com/blogg/

    Best Regards
    Gustav

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Does your custom theme include a comments.php template file? Are you calling it using comments_template(); in single.php?

  3. Gurkah
    Member
    Posted 1 year ago #

    Yep that is correct: the file loop-single.php is calling it using <?php comments_template(); ?>

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Does comments.php include <?php comment_form(); ?>?

  5. Gurkah
    Member
    Posted 1 year ago #

    Yes it does

  6. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Are you using a custom callback function in comment_form()?

  7. Gurkah
    Member
    Posted 1 year ago #

    Can you explain what that means. I'm not super confident in WordPress

  8. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    What exactly do you have in the <?php comment_form(); ?> line?

  9. Gurkah
    Member
    Posted 1 year ago #

    nothing more on that line. Just <?php comment_form(); ?>

  10. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    What happens if you switch to the default Twenty Eleven theme?

  11. Gurkah
    Member
    Posted 1 year ago #

    Then the comment box appears

  12. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Try renaming your comment.php file to something like comment-old.php

  13. Gurkah
    Member
    Posted 1 year ago #

    the comment.php in my own theme?

  14. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Yes.

  15. Gurkah
    Member
    Posted 1 year ago #

    It works now! thank you ver y much. The only thing that appears to be wrong that it says name on the email field, email on the website field etc. Where is that info located?

  16. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    The problem hasn't been solved. All you've done so far is narrowed down the cause of the problem to your comments.php file. I suspect there's an error in the file that is stopping it from working correctly (if at all). Rename the file back to comments.php and turn debug on and enable error logging to try and pinpoint the exact issue.

  17. Gurkah
    Member
    Posted 1 year ago #

    I'm sorry but don't really understand how I enable error logging. Do I copy "@ini_set('log_errors','On');
    @ini_set('display_errors','Off');
    @ini_set('error_log','/home/example.com/logs/php_error.log');
    /* That's all, stop editing! Happy blogging. */" into the comments.php. In that case, where?

  18. Gurkah
    Member
    Posted 1 year ago #

    I think I've enabled error logging now by puuting the code in the wp-config. Where do I find the log. And how do I pinpoint the issue?

  19. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Where do I find the log

    In your wp-content folder.

  20. Gurkah
    Member
    Posted 1 year ago #

    I can't seem to find it anywhere. Do I need to edit anything in the code except to change example.com to ulrikalidbo.com?

  21. Gurkah
    Member
    Posted 1 year ago #

    I've been looking all over for the error log but I can't find it. I really need to solve this pretty soon. And it would be great if you were willing to help me some more.

    Best Regards

Topic Closed

This topic has been closed to new replies.

About this Topic