Skip to content

Instantly share code, notes, and snippets.

@chriskoelle
Last active December 28, 2015 18:59
Show Gist options
  • Save chriskoelle/7547279 to your computer and use it in GitHub Desktop.
Save chriskoelle/7547279 to your computer and use it in GitHub Desktop.
Wordpress - Add this filter to your functions.php file to allow private and draft pages to be selected as parent pages.
function allow_private_parent_pages_nh( $dropdown_args, $post = 0 ) {
$dropdown_args['post_status'] = array('publish', 'draft', 'private');
return $dropdown_args;
}
add_filter('page_attributes_dropdown_pages_args', 'allow_private_parent_pages_nh', 10, 2);
add_filter('quick_edit_dropdown_pages_args', 'allow_private_parent_pages_nh', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment