Thanks, @danbp! You’re right – the code works in a theme’s functions.php, but not in bp-custom.php or in a plugin file. That’s a bit annoying for my project, but definitely glad to have it working!
I pasted all of the code from that page into my bp-custom.php, and it didn’t do anything.
I want to change the menu on a group page, not on a user profile page. So when you view something like example.com/groups/group-name, the default menu is this:
Home | Members | Admin
I want to add an item to that menu, so it is:
Home | Members | Campaigns | Admin