We have a site where we don’t want comments or trackbacks.

We’ve done the following to disable trackbacks:

  • In Settings > Discussion, unchecked “Allow link notifications from other blogs (pingbacks and trackbacks)”.
  • Unchecked “Allow people to post comments on new articles”.

We’ve also gone back and disabled comments and trackbacks for anything previously published.

This works well for Posts and Pages, but we still get random comments and trackbacks for custom post types.

Now, I know that I can remove post type support for custom post types. However, we didn’t explicitly set the “support” argument for comments in our custom post types definition, and in the Codex the default settings show that if you don’t set a value for “support”, the only thing the custom post type supports is the title and description fields.

Can someone help me understand why we are still getting trackbacks and comments?

Also, how can we stop them?

1
1

I was wrong when I said we had gone back and disabled all comments and trackbacks for previous posts. As it turns out, we did not. The comment from Dan above made me realize our error as when I began to scan our logs, I noticed these were all previously published pages. Whomp, whomp.

Our solution was to run the following two SQL statements on our database to shut off comments:

UPDATE wp_posts SET comment_status="closed";

and pings:

UPDATE wp_posts SET ping_status="closed";

for our previously published posts.

Source: WordPress Codex

Leave a Reply

Your email address will not be published. Required fields are marked *