[Resolved] Removing Comments completely?

Home Forums Support [Resolved] Removing Comments completely?

Home Forums Support Removing Comments completely?

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #8857
    Michelle

    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/

    #8858
    Tom
    Lead Developer
    Lead Developer

    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

    #8861
    Michelle

    Thank you! That worked beautifully.

    #81567
    Kevin

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

    #81763
    Tom
    Lead Developer
    Lead Developer
    #514194
    Simon

    Or if you are upgrading from an existing theme to GP – then I would recommend “Disable Comments” plugin, a much faster way to do it if many pages and posts. https://en-au.wordpress.org/plugins/disable-comments/

    #1782328
    Frank

    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.

    #1783036
    David
    Staff
    Customer Support

    If you follow the doc Tom provided here:
    https://generatepress.com/forums/topic/removing-comments-completely/#post-81763

    Then that will disable comments for any future posts / pages that you create.

    #1783483
    Frank

    Thanks!

    #1784091
    David
    Staff
    Customer Support
    #1856252
    Gregor

    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);
    });
    #2118806
    Clayton

    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!

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.