-
Author
Tagged: reorder tabs
-
October 2, 2015 at 14:09 #80401matt88Participant
By searching the forums I found this and similar code to reorder the buddypress tabs
COPY CODEfunction my_change_profile_tab_order() { global $bp; $bp->bp_nav['settings']['position'] = 10; $bp->bp_nav['activity']['position'] = 20; $bp->bp_nav['friends']['position'] = 30; $bp->bp_nav['groups']['position'] = 40; $bp->bp_nav['blogs']['position'] = 50; $bp->bp_nav['messages']['position'] = 60; $bp->bp_nav['profile']['position'] = 70; } add_action( 'bp_setup_nav', 'my_change_profile_tab_order', 999 );
But how would you reorder the Buddypress Group tabs
October 2, 2015 at 14:15 #80402matt88ParticipantAfter using different search terms I found this https://archived.seventhqueen.com/forums/topic/group-tabs-how-to-change-the-order Can I use both methods one for profile tabs and group tabs in the same file. I think it is functions.php, which code would go first?
October 2, 2015 at 14:18 #80403sharmstrModeratorYes. Doesnt matter which is first.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
October 2, 2015 at 15:11 #80417matt88ParticipantThanks sharmstr
I have the following code
COPY CODEadd_action('bp_init','change_media_tab_position', 12); function change_media_tab_position(){ global $bp; if( isset ($bp->bp_nav['media'])){ $bp->bp_nav['media']['position'] = 30; } } function my_change_profile_tab_order(){ global $bp; $bp->bp_nav['activity']['position'] = 10; $bp->bp_nav['profile']['position'] = 20; $bp->bp_nav['my articles']['position'] = 40; $bp->bp_nav['forums']['position'] = 50; $bp->bp_nav['groups']['position'] = 60; $bp->bp_nav['events']['position'] = 70; $bp->bp_nav['friends']['position'] = 80; $bp->bp_nav['send invites']['position'] = 90; $bp->bp_nav['notifications']['position'] = 100; $bp->bp_nav['messages']['position'] = 110; $bp->bp_nav['settings']['position'] = 120; } add_action( 'bp_setup_nav', 'my_change_profile_tab_order', 999 );
But not all the tabs are lining up to the order plus it added some blank tabs see screenshot
Attachments:
You must be logged in to view attached files.October 2, 2015 at 15:31 #80422sharmstrModeratorBecause it needs the names of the slug. ‘my articles’ isnt the slug. ‘articles’ is. ‘send invites’ is probably wrong too, so is events. click on the link and look at the url to find the slug. Because you didnt use the correct slugs, 3 phantom tabs were created and 3 werent moved.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.