[wp-hackers] Disable comments on pages post type

John Blackbourn johnbillion+wp at gmail.com
Thu May 26 14:13:17 UTC 2011

On 26 May 2011 14:53, Robert Lusby <nanogwp at gmail.com> wrote:
> What's the "best practise" way to disable comments support on the "page"
> post types?

remove_post_type_support( 'page', 'comments' );

However - I tried this code the other day and it seems there is
something odd going on that overrides this setting again in core and
ends up adding back 'comments' support to pages (I'm running 3.2 beta
at the moment, might not affect 3.1). Give it a try. You should use it
on the 'init' hook.


More information about the wp-hackers mailing list