How can I make it so the Add New Post page has Visibility set to Private by default?

since you’re developing a plug-in, I assume you don’t want to touch any files outside of wp-content/plugins or ../themes for that matter.

However, if that’s not the case, follow along:
Go to wp-admin/includes/meta-boxes.php and find:

$visibility = 'public';
$visibility_trans = __('Public');

Now change it to the obvious:

$visibility = 'private';
$visibility_trans = __('Private');

Again, this affects the meta-boxes.php file which is outside of the plugins folder. Nonetheless, I think the approach you should be taking is creating a new meta box, adding your custom visibility setting (i.e. private) and make the latter override the default WP visibility setting.

Best,
Chris

Leave a Comment