I am attempting to hide the “Delete Group” sub nav item in Groups >> Manage, using the following code in bp-custom.php
if(!current_user_can(‘administrator’)){
bp_core_remove_subnav_item( bp_get_current_group_slug() . ‘_manage’, ‘delete-group’ );
}}
This does delete the item. However it has an unusual side-effect I don’t understand:
groups/test/admin/ brings up a 404 error (without the code above, this brings up the Manage >> Details tab)
groups/test/admin/edit-details still works after I type it in manually.
How can I fix this?
I have a fresh WP and BP install. Twenty-Sixteen theme.