The code below will completely disable any commenting and trackback features in WordPress. It is in response to the usual issue whereby you think comments have been completely turned-off only to get a notification that there are a new comments waiting moderation.

This code won’t turn off any “This post has X comments” or front-end code that displays comments that may be in your theme. Instead it removes the ability for comments to be added/stored against posts. To remove front-end comment boxes and listings you’ll need to change your individual templates

Simply copy and paste into your functions.php file in your WordPress theme folder.

WordPress

WordPress is fast, flexible, responsive and open source. Your WordPress site can be built from the ground up to be fast, accessible and search engine friendly.

About WordPress · WordPress Posts

Related WordPress Posts

Why is WordPress still so popular?

WordPress WordPress is one of the most popular content management systems (CMS) in the world, and there are several reasons why it is so widely... February 2023 · WordPress

WordPress - WebP and AVIF Image Formats

An introduction to image optimisation in WordPress Northern Ireland **[Image Optimisation](/web-image-formats)** is an increasingly important step improve page speed and search engine performance of your... September 2022 · WordPress

WordPress CLI Commands

WP-CLI is the official command line tool for interacting with and managing your WordPress Northern Ireland installation in command line. WP-CLI is the command-line interface... July 2022 · WordPress

More WordPress Posts...