-
Home
-
WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager
- Tips
How to Hide WPCode Lite Admin Menus
function plt_hide_insert_headers_and_footers_menus() {
//Hide "Code Snippets".
remove_menu_page('wpcode');
//Hide "Code Snippets → Code Snippets".
remove_submenu_page('wpcode', 'wpcode');
//Hide "Code Snippets → + Add Snippet".
remove_submenu_page('wpcode', 'wpcode-snippet-manager');
//Hide "Code Snippets → Header & Footer".
remove_submenu_page('wpcode', 'wpcode-headers-footers');
//Hide "Code Snippets → Conversion Pixels".
remove_submenu_page('wpcode', 'wpcode-pixel');
//Hide "Code Snippets → Library".
remove_submenu_page('wpcode', 'wpcode-library');
//Hide "Code Snippets → File Editor".
remove_submenu_page('wpcode', 'wpcode-file-editor');
//Hide "Code Snippets → Search & Replace".
remove_submenu_page('wpcode', 'wpcode-search-replace');
//Hide "Code Snippets → Backups".
remove_submenu_page('wpcode', 'wpcode-duplicator');
//Hide "Code Snippets → Tools".
remove_submenu_page('wpcode', 'wpcode-tools');
//Hide "Code Snippets → Settings".
remove_submenu_page('wpcode', 'wpcode-settings');
//Hide "Code Snippets → Upgrade to Pro".
remove_submenu_page('wpcode', 'https://wpcode.com/lite/?utm_source=liteplugin&utm_medium=dashboard&utm_campaign=admin-side-menu');
}
add_action('admin_menu', 'plt_hide_insert_headers_and_footers_menus', 41);
Where do I put this code?
How to Hide the "WPCode Page Scripts" Meta Box
function plt_hide_insert_headers_and_footers_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "WPCode Page Scripts" meta box.
remove_meta_box('wpcode-metabox-snippets', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_insert_headers_and_footers_metaboxes', 20);