-
Home
-
PLX Portal Connector v2 for WordPress
- Tips
How to Hide PLX Portal Connector Admin Menus
function plt_hide_plx_portal_connector_menus() {
//Hide the "PLX Portal" menu.
remove_menu_page('edit.php?post_type=plx_portal_content');
//Hide the "PLX Portal → Web Content" menu.
remove_submenu_page('edit.php?post_type=plx_portal_content', 'edit.php?post_type=plx_portal_content');
//Hide the "PLX Portal → Add New Web Content" menu.
remove_submenu_page('edit.php?post_type=plx_portal_content', 'post-new.php?post_type=plx_portal_content');
}
add_action('admin_menu', 'plt_hide_plx_portal_connector_menus', 15);
Where do I put this code?
How to Hide the "Access Token" Meta Box
function plt_hide_plx_portal_connector_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Access Token" meta box.
remove_meta_box('plx_portal_content_connector_main', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_plx_portal_connector_metaboxes', 20);