Is there any way to disable or remove the “Auto add pages – Automatically add new top-level pages to this menu” functionality via a theme?
I suppose I could hide it with a bit of CSS, but I’d rather do more cleanly if possible.
Many clients click that not realizing what it does and chaos ensues.
Since there is no filter to remove this option, your best best to to stick to using CSS by putting the following in your child theme’s functions.php
:
add_action( 'admin_head', 'wpse_225635_menu_css' );
function wpse_225635_menu_css() {
global $pagenow;
if ( $pagenow == 'nav-menus.php' ) {
?>
<style type="text/css">
.auto-add-pages {
display: none;
}
</style>
<?php
}
}