1 year, 5 months ago
I want to add a menu item to the groups page.
I have found plenty of information about how to use bp_core_new_nav_item() to add menu items to the profile page, and pages such as this http://themekraft.com/blog/customize-profile-and-group-menus-in-buddypress/ that explain how to add and reorder menu items on the groups page, but I haven’t been able to find anything about how to add a menu item to the groups page.
Does anyone know how to do this?
You can use the Group Extension API to build your own group area : https://codex.buddypress.org/developer/group-extension-api/
I have read over that page a dozen times, and tried the code samples, but they don’t seem to do what I want. Could you give me more guidance?
Both example mentionned by imath on the codex are working. And the output goes nice when you’re on a group page. Just tested them with 2014 and the whole code in functions.php…
But can you be more explicit of what you want ?
Do you mean the group directory menu only ? Like this:
| All Groups (3) | My Groups (1) | My item |
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
I confirm: the code example doesn’t work from within bp-custom.php. But he works in theme/functions.php
And if all is goig well, you’ll have the right result after that. 😉
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!
Follow BuddyPress on Twitter •
Contact Us •
Terms of Service