Greetings
I’ve successfully created an “Events” tab to the Buddypress Groups tabs.
Now I want to add two “sub” tabs ie. “Events” and “Create an event”.
I’ve been using bp_core_new_subnav_item(with the “parent” slug as groups/group-name-events) to add two new sub (or are they actually sub-sub) tabs showing but it’s just not working and I’m starting to wonder if it’s just me or maybe this isn’t even possible?
Any thoughts would be much appreciated.
Warm regards
NikHi Nik,
If you are thinking of sub nav as in User profile, the group does not list it even if you added.You do have access to our Group Tabs Creator, This plugin will add sub tabs for any new group tab. It will not help if you are registering via code.
Regards
BrajeshHi Brajesh
Thank you for getting back to me so promptly.
Yes I guess I do mean as in the User profile where I’ve successfully created tabs with sub navs in the past. Are you saying that Group profiles don’t work the same, even though you can still use the same (bp_core_new_subnav_item) function for the “top level” tab?
I do have access to your Group Tabs Creator (although I might need to renew to update to the latest version) but are you suggesting that can create with code what can’t be achieved in a “standard” way ie. a new group tab with two sub navs?
With many thanks again.
NikHi Nik,
There is no standard way to do it.Here is what we are doing with Group Tabs:-
In the screen function for parent tab, we add a section for displaying a list of sub navs.
These sub navs are generated by us by looking through all our registered sub navs for that particular parent(these are just plain links being generated with similar markup to sub nav).You may use this idea to achieve your goal.
Regards
BrajeshHi Brajesh
As it happens, something along the lines of your suggestion had already crossed my mind 😉
I always like to try and do things the right/clean way but in this case, it does seem that is the only way… and at least now I know I really was trying to achieve the impossible with the methods I was using.
How strange that Buddypress doesn’t handle group navs in the same way as profile navs.
Thank you again for your help.
Regards
NikHi Nik,
It’s always good to look for better ways 🙂
I am glad it is resolved.
Regards
Brajesh
The topic ‘ [Resolved] Group tabs’ is closed to new replies.