-
Author
Tagged: buddypress, Tabs, profile, rearrange tabs
-
August 5, 2014 at 21:16 #24789maxrevzParticipant
I would like to move the order of my profile (and group) tabs, is there an easy way to do this?
Attachments:
You must be logged in to view attached files.August 7, 2014 at 12:51 #24980CatalinModeratorHello,
Hi,
Those are generated by Buddypress and you can change them by adding this code to wp-content/plugins/bp-custom.php. If the fie doesn’t exit create it:COPY CODEfunction kleo_change_profile_tab() { global $bp; $bp->bp_nav['profile']['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['settings']['position'] = 70; } add_action( 'bp_setup_nav', 'kleo_change_profile_tab', 999 ); define( 'BP_DEFAULT_COMPONENT', 'profile' );
Change the order in the above arrays if you like.
Let me know if this helps.
Thank you,
CatalinHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAugust 7, 2014 at 23:24 #25070maxrevzParticipantThis doesnt work :/
The nav menu does not change and I get error text at the top.
Attachments:
You must be logged in to view attached files.August 11, 2014 at 16:54 #25336CatalinModeratorHello,
Take a look at this link:
http://bp-tricks.com/snippets/code/arrange-group-profile-navigation-menu/
here it is explained better. Add the code in functions.php from your child theme.
Let me know if this works.
Thank you,
CatalinHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJanuary 1, 2015 at 07:24 #40829NormanParticipant@Catalin Hi Catalin I am trying to achieve the same as maxrevz but it is also not working for me. I also used the code you linked to http://bp-tricks.com/snippets/code/arrange-group-profile-navigation-menu/
but it has no effect.I inserted in the functions.php in my childtheme. Do I have to make a plugin folder for the functions.php in the child theme ?
January 1, 2015 at 19:35 #40847NormanParticipant@Catalin I fixed it, i turned out that when I edit the functions.php via my ftp editor it is changing
‘ in to ` that was all the problem.
But it is strange that I can’t reorder the MEDIA from rtmedia, everything else works great.
I used this ( in case someone needs it ) put it in your child functions.php
function mb_profile_menu_tabs(){
global $bp;
$bp->bp_nav[‘notifications’][‘position’] = 110;
$bp->bp_nav[‘articles’][‘position’] = 22;
$bp->bp_nav[‘media’][‘position’] = 14;
}
add_action(‘bp_setup_nav’, ‘mb_profile_menu_tabs’, 201);February 5, 2015 at 19:51 #44859mcperlyParticipantFYI – This wasn’t working for me either. But I simply cut and pasted this code in my text editor. I had to retype everything from scratch. Then it worked perfectly. So if it does not work for anyone, just retype it all in the order you want – do not copy and paste. Hope this helps someone.
February 5, 2015 at 20:11 #44860sharmstrModeratorThe copy and paste doesn’t work because of the pretty formatting of the single quotes as @Norman found.
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 ‘KLEO’ is closed to new topics and replies.