“Leave a comment” also shows, if comments aren’t allowed.
-
A user reported some issue with this theme on the German support forums: The link “Leave a comment” is shown, but inactive; no comment form is displayed.
I assume the user didn’t allow comments for this particular post, but tried to reproduce the issue on a local test environment.
If I leave the allow comments check box unchecked in the editor and publish the post, I can reproduce the issue: the link “Leave a comment” shows up, but is inactive as the target in the link
https://example.com/post-name/#respond
isn’t available on the web page.The template-part
content-single.php
uses a functiontreville_entry_meta()
to display the post meta data. This function concatenates three functions, one beingtreville_meta_comments()
. This function displays theLeave a comment
link, but doesn’t include a function to check, whether comments are open.
- The topic ‘“Leave a comment” also shows, if comments aren’t allowed.’ is closed to new replies.