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

WordPress Development Belfast, Northern Ireland

If you are a business in Belfast or Northern Ireland who is looking to expand your presence online, [WordPress](/wordpress-northern-ireland) is a great platform to take... January 2022 · WordPress

WordPress - Rename the Posts section in Admin

The PHP script below can be added to the WordPress Theme functions.php file. It will rename the standard "posts" section to "stories". Replace 'stories'/'story' with... October 2020 · WordPress

Notes on Transferring a WordPress site to AWS

Some notes on transferring an existing WordPress site to Amazon Web Services and some common issues. ## MySQL Import Fail If the import fails on... August 2020 · WordPress

More WordPress Posts...