-
Home
-
Better AMP – WordPress Complete AMP
- Tips
How to Hide Better AMP - WordPress Complete AMP Admin Menus
function plt_hide_better_amp_menus() {
//Hide "Tools → Redux Framework".
remove_submenu_page('tools.php', 'redux-about');
//Hide "Better AMP".
remove_menu_page('better-amp-translation');
//Hide "Better AMP → Translation".
remove_submenu_page('better-amp-translation', 'better-amp-translation&tab=1');
//Hide "Better AMP → Options Object".
remove_submenu_page('better-amp-translation', 'better-amp-translation&tab=2');
//Hide "Better AMP → Import / Export".
remove_submenu_page('better-amp-translation', 'better-amp-translation&tab=3');
//Hide "Better AMP → Customize AMP".
remove_submenu_page('better-amp-translation', 'customize.php?url=http%3A%2F%2F127.0.0.1%2Famp&autofocus%5Bpanel%5D=better-amp-panel');
}
add_action('admin_menu', 'plt_hide_better_amp_menus', 1000);
Where do I put this code?
How to Hide the "Better AMP Settings" Meta Box
function plt_hide_better_amp_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Better AMP Settings" meta box.
remove_meta_box('better-amp-settings', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_better_amp_metaboxes', 20);
How to Hide the "Redux Framework News" Dashboard Widget
function plt_hide_better_amp_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Redux Framework News" widget.
remove_meta_box('redux_dashboard_widget', 'dashboard', 'side');
}
add_action('wp_dashboard_setup', 'plt_hide_better_amp_dashboard_widgets', 20);