I am writing a plugin that upon activation, it creates a few new pages. On these pages, I want to disable the comments option. I am adding the new pages via the code below:
$page['post_type'] = 'page'; $page['post_status'] = 'publish'; $page['post_author'] = 1; $page['post_parent'] = 0; $page['post_title'] = 'Test Page'; $page['post_content'] = 'this is a test. i want to disable the discussion option.'; $pageid = wp_insert_post($page);
In the WordPress codex, I do not see any option/property/meta to disable the Discussion section of a page/post. Does anyone know how?