In a wordpress theme, when i get to appearance > menus i can see some default options to add to my menu (pages, posts, custom-links, etc) and custom post-types. I only need Custom Links to be shown. And I need it to come with the theme, so unchecking the boxes at "screen options" is not an option. I imagine there must be some code I need to add to the theme's functions.php. I was advised to try this:
add_filter( 'hidden_meta_boxes', 'custom_hidden_meta_boxes' );
function custom_hidden_meta_boxes( $hidden ) {
$hidden[] = 'pages';
return $hidden;
}
but it doesn't seem to work.
Does anyone have an idea how to do it?