I am using a plugin which creates both a custom post type for all my "posts" data and also another plugin which entirely handles the commenting system. Therefore I would like to entirely hide the comments and posts section from the site.
I currently have the following function:
function remove_admin_menus() {
remove_menu_page( 'edit-comments.php' );
remove_menu_page( 'edit.php' );
}
However this doesn't seem to do anything. Do I need to call this function anywhere to make it actually remove the menu items?