Completely disable comments

Is there a way (hacks, plugins…) to completely disable comments in WP?

By this, I mean completely hiding the feature from view automatically, for existing and new users alike. In particular:

Read More
  • the WP admin bar and menu
  • the posts, pages and medias list, their screen options, and their filters
  • the post, page and media editor and their screen options
  • the widgets screen
  • the applicable settings screens

And of course, disabling the functionality.

I’ve run into a variety of aging hacks to do part of this, namely and mostly code to disable meta boxes and a handful of hacks to auto-disable comments. I’m turning to SO in the hopes that some web designer or developer might have the entire set of features on hand.

If not, might there be new APIs from the past 3-4 years that make the process simpler (my WP skills are getting rusty), or is seeing it through going to be an awkward output buffer manipulation-related hack?

Related posts

1 comment

  1. The following is the list of hooks used by Frank Bultge’s plugin Remove Comments Absolutely:

    # Set the status on posts and pages - is_singular ()
    add_filter( 'the_posts', array( $this, 'set_comment_status' ) );
    
    # Close comments, if open
    add_filter( 'comments_open', array( $this, 'close_comments'), 10, 2 );
    add_filter( 'pings_open', array( $this, 'close_comments'), 10, 2 );
    
    # Change options for dont use comments
    # Remove meta boxes on edit pages
    # Remove support on all post types for comments
    add_action( 'admin_init', array( $this, 'remove_comments' ) );
    
    # Remove menu-entries
    add_action( 'admin_menu', array( $this, 'remove_menu_items' ) );
    
    # Add class for last menu entry with no 20
    add_filter( 'add_menu_classes', array( $this, 'add_menu_classes' ) );
    
    # Remove areas for comments in backend via JS
    add_action( 'admin_head', array( $this, 'remove_comments_areas' ) );
    
    # Remove comment entry in Admin Bar
    add_action( 'wp_before_admin_bar_render', array( $this, 'admin_bar_render' ) );
    

Comments are closed.