-
Home
-
Scroll Top – WordPress Scroll to Top plugin
- Tips
How to Hide Scroll to top builder Admin Menus
function plt_hide_scroll_to_top_builder_menus() {
//Hide "Scroll to Top".
remove_menu_page('edit.php?post_type=ystpscroll');
//Hide "Scroll to Top → All Items".
remove_submenu_page('edit.php?post_type=ystpscroll', 'edit.php?post_type=ystpscroll');
//Hide "Scroll to Top → Add New".
remove_submenu_page('edit.php?post_type=ystpscroll', 'post-new.php?post_type=ystpscroll');
//Hide "Scroll to Top → Scroll Types".
remove_submenu_page('edit.php?post_type=ystpscroll', 'ystpscroll');
//Hide "Scroll to Top → More Ideas?".
remove_submenu_page('edit.php?post_type=ystpscroll', 'ystp-ideas-page');
//Hide "Scroll to Top → Support".
remove_submenu_page('edit.php?post_type=ystpscroll', 'ystp-support-page');
//Hide "Scroll to Top → More Plugins".
remove_submenu_page('edit.php?post_type=ystpscroll', 'ystp-more-plugins-page');
}
add_action('admin_menu', 'plt_hide_scroll_to_top_builder_menus', 11);
Where do I put this code?
How to Hide Scroll to top builder Meta Boxes
function plt_hide_scroll_to_top_builder_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "hidden options" meta box.
remove_meta_box('hiddenMetaboxes', $screen->id, 'normal');
//Hide the "Custom functionality" meta box.
remove_meta_box('customFunctionality', $screen->id, 'normal');
//Hide the "General options" meta box.
remove_meta_box('generalMetaboxes', $screen->id, 'normal');
//Hide the "Display settingss" meta box.
remove_meta_box('displaySettings', $screen->id, 'normal');
//Hide the "Conditions" meta box.
remove_meta_box('conditionsSection', $screen->id, 'normal');
//Hide the "Info" meta box.
remove_meta_box('infoMetabox', $screen->id, 'side');
//Hide the "Support" meta box.
remove_meta_box('supportMetabox', $screen->id, 'side');
//Hide the "Main options" meta box.
remove_meta_box('mainOptions', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_scroll_to_top_builder_metaboxes', 20);