Comments are closed. Now make them go away

  • Question
  • Updated 4 years ago
On Autofocus Pro 2 how can I remove the "Comments are closed" at the bottom of pages and posts? The only info I found has to do with the previous versions.
Photo of J Korwek

J Korwek

  • 8 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 2
Photo of lesley

lesley

  • 29 Posts
  • 0 Reply Likes
I have this same question....I finally figured out how to remove the comment box from pages (only in Quick Edit, strangely enough). Now I am left with "comments are closed" at the bottom of every page.

I think, from reading at WP forums, the code to remove is specific to the theme?
Photo of AxelYa

AxelYa

  • 548 Posts
  • 105 Reply Likes
Comments are closed is not the same as Allow / Disallow comments

Comment box disappears when you disallow comments for that particular post.

Check the discussion page in Admin ->Settings->Discussion
There is a checkbox - Close comments for old posts - It is not the same as disallow
Photo of lesley

lesley

  • 29 Posts
  • 0 Reply Likes
Thank you for your thoughts....but this is about the "comments closed" text showing up on Pages, not posts. I made the comment box disappear using a setting in Quick Edit of the particular page. Then the "comments are closed" appeared.

I don't see why comments are even a part of Pages. Most people seem to want to use Pages as something completely different than Posts.
Photo of AxelYa

AxelYa

  • 548 Posts
  • 105 Reply Likes
Ok. managed to replicate it.

It happens if you use "archive-page" or "fullwidth-page" templates.
It doesn't happen with Default page template

This code is from Default page:
// Only show the Comments Form if the post has comments open
if ( comments_open() || get_comments_number() != '0' ) {
comments_template( '', true );
}


go to fulwidth-page template and archive-page

and replace the original line
comments_template( '', true );

with the above

Test
Photo of seancotterS

seancotter

  • 12 Posts
  • 2 Reply Likes
Thanks!
Photo of Jo

Jo

  • 9 Posts
  • 0 Reply Likes
Awesome, thanks!
Photo of lesley

lesley

  • 29 Posts
  • 0 Reply Likes
Thank you so much! That, indeed, does the trick.

I appreciate the time you took to figure that out.
Photo of AxelYa

AxelYa

  • 548 Posts
  • 105 Reply Likes
Don't mention it. I have insomnia anyway.