Disable Comments and author links in WordPress

There are times when you have a WordPress site where you won’t need, want, or use comments. Opinions are good, but they can also be distracting.

Another reason would be that perhaps you don’t want to deal with all the spam that comes with moderating comments. There are a lot of instances where it’s best to disable WordPress comments altogether. In fact, we disable comments on this site.

// Disable comments
function disable_comments_status() {
    return false;
add_filter( 'comments_open', 'disable_comments_status', 20, 2 );
add_filter( 'pings_open', 'disable_comments_status', 20, 2 );
// Disable author links
function disable_author_links( $author_link ) {
    return "#";
add_filter( 'author_link', 'disable_author_links', 10, 1 );
Was this guide helpful?