Skip to content

Instantly share code, notes, and snippets.

@Otto42
Last active April 6, 2022 02:21
Show Gist options
  • Save Otto42/5460858 to your computer and use it in GitHub Desktop.
Save Otto42/5460858 to your computer and use it in GitHub Desktop.
Allow Private Pages to be parents of other pages
<?php
/*
Plugin Name: Allow Private Parents
Author: Otto
Author URI: http://ottopress.com
*/
add_filter('page_attributes_dropdown_pages_args', 'allow_private_page_parents');
function allow_private_page_parents($args) {
$args['post_status'] = array( 'publish', 'private' );
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment