Add missing comments block to page template#127
Conversation
|
Please note that of course most of people don't want the sentence "Comments are closed." to be displayed at the bottom of each page since comments are closed by default for Pages. Therefore, I'm going to open a Trac ticket to provide a filter to remove this sentence. Then, the deactivation of this sentence by default for pages will be possible on Gutenberg side. I'll take care of opening the Trac ticket, then the Gutenberg PR. Anyway, I believe we need to implement this PR, since the Page comments core feature is currently broken on TT2. |
|
Ticket opened on Trac: https://core.trac.wordpress.org/ticket/54283 |
|
I hope you don't mind — I took a few minutes to bring this up to date with the changes from #136. I think it's ready for a last review, it should be good to merge assuming we get a resolution to the related Gutenberg issue. When testing this, note that the spacing isn't entirely consistent depending on whether or not comments are turned on. I opened a PR in Gutenberg to fix this: WordPress/gutenberg#35887 |
|
Looks great to me @kjellr 👍 |
jffng
left a comment
There was a problem hiding this comment.
LGTM, thanks @audrasjb @kjellr ! I think we can bring this in and assume WordPress/gutenberg#35732 will get addressed as the PR to make it work is quite small.
Description
Twenty Twenty-Two must support comments on Page post type, if enabled on a specific page using the "discussion" settings:

We simply need to add the comment block template to the page.html template.
Screenshots
Before the PR: a Page with comment option enabled didn't show any comment/comment form.

After the PR: comments/comment form is displayed when the option is enabled.

Testing Instructions