Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Turn off some screen options; turn ON others
add_filter( 'default_hidden_meta_boxes', 'scl_toggle_meta_boxes', 10, 2 );
function scl_toggle_meta_boxes( $hidden, $screen ) {
$hide_these = array(
if ( $screen->base == 'nav-menus' ) {
$show_these = array(
'hptal-metabox', // Post Type Archive Links box
$hidden = array_diff( $hidden, $show_these );
return array_merge( $hidden, $hide_these );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment