Gurkah
Member
Posted 6 months 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
Does your custom theme include a comments.php template file? Are you calling it using comments_template(); in single.php?
Gurkah
Member
Posted 6 months ago #
Yep that is correct: the file loop-single.php is calling it using <?php comments_template(); ?>
Does comments.php include <?php comment_form(); ?>?
Gurkah
Member
Posted 6 months ago #
Are you using a custom callback function in comment_form()?
Gurkah
Member
Posted 6 months ago #
Can you explain what that means. I'm not super confident in WordPress
What exactly do you have in the <?php comment_form(); ?> line?
Gurkah
Member
Posted 6 months ago #
nothing more on that line. Just <?php comment_form(); ?>
What happens if you switch to the default Twenty Eleven theme?
Gurkah
Member
Posted 6 months ago #
Then the comment box appears
Try renaming your comment.php file to something like comment-old.php
Gurkah
Member
Posted 6 months ago #
the comment.php in my own theme?
Gurkah
Member
Posted 6 months 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?
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.
Gurkah
Member
Posted 6 months 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?
Gurkah
Member
Posted 6 months 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?
Where do I find the log
In your wp-content folder.
Gurkah
Member
Posted 6 months 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?
Gurkah
Member
Posted 6 months 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