-
Home
-
Load HTML Files
- Tips
How to Hide Load HTML Files Admin Menus
function plt_hide_load_html_files_menus() {
//Hide "HTML files".
remove_menu_page('edit.php?post_type=html_files');
//Hide "HTML files → All HTML files".
remove_submenu_page('edit.php?post_type=html_files', 'edit.php?post_type=html_files');
//Hide "HTML files → Add New HTML file".
remove_submenu_page('edit.php?post_type=html_files', 'post-new.php?post_type=html_files');
//Hide "HTML files → HTML files Categories".
remove_submenu_page('edit.php?post_type=html_files', 'edit-tags.php?taxonomy=html_files_category&post_type=html_files');
//Hide "HTML files → Settings".
remove_submenu_page('edit.php?post_type=html_files', 'load-html-files-settings');
}
add_action('admin_menu', 'plt_hide_load_html_files_menus', 11);
Where do I put this code?
How to Hide the "HTML Editor" Meta Box
function plt_hide_load_html_files_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "HTML Editor" meta box.
remove_meta_box('load_html_files_editor', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_load_html_files_metaboxes', 20);