-
Home
-
GoPray
- Tips
How to Hide GoPray Admin Menus
function plt_hide_gopray_menus() {
//Hide "GoPray".
remove_menu_page('wpgp_plugin_menu');
//Hide "GoPray → Prayer Requests".
remove_submenu_page('wpgp_plugin_menu', 'edit.php?post_type=wpgp_prayer_request');
//Hide "GoPray → Prayer Comments".
remove_submenu_page('wpgp_plugin_menu', 'edit.php?post_type=wpgp_prayer_comment');
//Hide "GoPray → Settings".
remove_submenu_page('wpgp_plugin_menu', 'wpgp_settings');
}
add_action('admin_menu', 'plt_hide_gopray_menus', 11);
Where do I put this code?
How to Hide GoPray Meta Boxes
function plt_hide_gopray_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Prayer Request Details" meta box.
remove_meta_box('wpgp_prayer_request_meta_box', $screen->id, 'advanced');
//Hide the "Prayer Comment Details" meta box.
remove_meta_box('wpgp_prayer_comment_meta_box', $screen->id, 'advanced');
}
add_action('add_meta_boxes', 'plt_hide_gopray_metaboxes', 20);