Site logo

Archived topic

Removing Comments completely?

11 replies · Started by Anonymous on August 3, 2014

Viewing posts 1–12 of 12

Hello!

Love the theme and it is working very well for our new site. One issue - how do I completely remove the "Leave a Comment" option/box from my static home page? I do not want comments.

I have tried unchecking all the boxes under Settings: Discussion but it is still showing! Help!

http://thefamilyschool-phoenix.org/main/

Hi Michelle,

Turning off comments in Settings > Discussion will prevent comments from appear on all future created pages, but won't remove the setting from previously created pages.

In order to do that, go to the Edit Page section of the page, and click "Screen Options" near the top right, and make sure "Discussion" is selected.

Now look near the bottom of the page for the "Discussion" metabox, and uncheck the options to show comments.

You can also go to your list of pages, and click "Quick Edit" to deselect the comments option.

Hope this helps :)
Tom

Thank you! That worked beautifully.

Is there another way to remove comments, I try that but I still showing the comment box on my post

I see that we can uncheck comments in the metabox. Also that we can use the disable comments plugin.

Do either of these prevent new pages or posts from creating comment boxes in the future? I.e. I don’t want any new pages or posts to display a comments section.

Thanks!

You're welcome

If you want to remove the comments section in template and thus completely remove comments for all future and past comments, you can also remove this action:

remove_action( 'generate_after_do_template_part', 'generate_do_comments_template', 15);

However, this will only work once the theme is set up so you should hook it to after_setup_theme.

add_action('after_setup_theme', function(){
    remove_action( 'generate_after_do_template_part', 'generate_do_comments_template', 15);
});

Thanks Gregor! This is what I needed since I'm still using comments (within a GenerateBlocks content template) but needed to unhook completely the comments section at a template level. I appreciate it!

This archived topic is closed to new replies.