-
Author
Tagged: activity
-
May 15, 2015 at 13:42 #58881dannicastanheiraParticipant
Hello,
I am trying to change the position of the menus in the member profiles. Have checked some old topics but it doesn’t seem to make any change. I used the example below in wp-content/plugins and no luck still.
My question is about the name of the function as i have seen some different examples, so it may be the issue. This example is “my_change_profile_tab_order”.
Is that the right approach?
Thanks a lot in advance!
<?php
function my_change_profile_tab_order() {
global $bp;$bp->bp_nav[‘activity’][‘position’] = 10;
$bp->bp_nav[‘friends’][‘position’] = 20;
$bp->bp_nav[‘followers’][‘position’] = 30;
$bp->bp_nav[‘groups’][‘position’] = 40;
$bp->bp_nav[‘events’][‘position’] = 50;
$bp->bp_nav[‘media’][‘position’] = 60;
$bp->bp_nav[‘following’][‘position’] = 70;
$bp->bp_nav[‘messages’][‘position’] = 80;
$bp->bp_nav[‘forum’][‘position’] = 90;
$bp->bp_nav[‘profile’][‘position’] = 100;
$bp->bp_nav[‘notifications’][‘position’] = 110;
$bp->bp_nav[‘settings’][‘position’] = 120;
$bp->bp_nav[‘wp-social-invitations’][‘position’] = 130;
}
add_action( ‘bp_setup_nav’, ‘my_change_profile_tab_order’, 999 );?>
May 15, 2015 at 14:08 #58887sharmstrModeratorYou should be putting it in either your childs functions.php file or in /plugins/buddypress/bp-custom.php
https://archived.seventhqueen.com/forums/topic/insert-login-box-on-a-page-and-rearrange-profile-menu-tabs#post-53532
https://archived.seventhqueen.com/forums/topic/reorder-user-profile-menu#post-35607Hi 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
May 15, 2015 at 15:11 #58906dannicastanheiraParticipantHi Sharmstr! I have checked botH topics before and applied the code both nothing happens. 🙁
May 15, 2015 at 18:12 #58939sharmstrModeratorIt works. I’m using it on 3 sites. So either you’ve copied it wrong, you have a plugin conflict or possibly a caching issue.
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
Attachments:
You must be logged in to view attached files.May 29, 2015 at 18:23 #60524Alvin341965ParticipantHello and sorry to say this doesn’t work.
I can’t find plugins/buddypress/bp-custom.php it’s not there!
i want follow | followers first, then media then groups, then activity then profile.
Or i want to hide some i don’t know yet.please help me in how to do it. i’ve tried to put it in kleo-child functions.php doesn’t work.
Any help is welcome
kind regards
A.
Attachments:
You must be logged in to view attached files.May 29, 2015 at 19:09 #60527dannicastanheiraParticipantAlvin i used the code below but in the functions.php file at the following directory path: /public_html/wp-content/themes/kleo
Last 3 lines of code is to changing name and the others position of the menus.
// Reorder menus
function my_change_profile_tab_order() {
global $bp;$bp->bp_nav[‘profile’][‘position’] = 10;
$bp->bp_nav[‘media’][‘position’] = 20;
$bp->bp_nav[‘location’][‘position’] = 30;
$bp->bp_nav[‘activity’][‘position’] = 50;
$bp->bp_nav[‘friends’][‘position’] = 40;
$bp->bp_nav[‘notifications’][‘position’] = 60;
$bp->bp_nav[‘profile’][‘name’] = ‘Details’;
$bp->bp_nav[‘friends’][‘name’] = ‘Favorites’;
$bp->bp_nav[‘notifications’][‘name’] = ‘Inbox’;May 30, 2015 at 00:44 #60562Alvin341965Participantthank you for your reply but where do i put this in the functions.php? what line
i get blank page if i paste it and save the file.i have my vps
/var/www/sites/mysite.com/wp-content/themes/kleo/
if i put it on kleo-child/functions.php
it doesn’t do anything either…i’m lost now 🙁
May 30, 2015 at 00:54 #60563dannicastanheiraParticipantForgot 2 lines of code, you can post it anywhere in the file
// Reorder menus
function my_change_profile_tab_order() {
global $bp;$bp->bp_nav[‘profile’][‘position’] = 10;
$bp->bp_nav[‘media’][‘position’] = 20;
$bp->bp_nav[‘location’][‘position’] = 30;
$bp->bp_nav[‘activity’][‘position’] = 50;
$bp->bp_nav[‘friends’][‘position’] = 40;
$bp->bp_nav[‘notifications’][‘position’] = 60;
$bp->bp_nav[‘profile’][‘name’] = ‘Details’;
$bp->bp_nav[‘friends’][‘name’] = ‘Favorites’;
$bp->bp_nav[‘notifications’][‘name’] = ‘Inbox’;}
add_action( ‘bp_setup_nav’, ‘my_change_profile_tab_order’, 999 );May 30, 2015 at 01:26 #60564Alvin341965Participantextra note* i’ve got it working… stupid me while pasting it changed char.
Now how do i set default profile view to first item that is (media)?So when i view profile i see all media items and not profile fields
again kind regards
A.
May 30, 2015 at 01:45 #60565dannicastanheiraParticipantChange 10, 20, 30, 40 in the code to the order of fields you want to show up first. 10 = media and so on
May 30, 2015 at 01:51 #60566Alvin341965Participantthank you dannicastanheira for your quick reply.
but that is not what i ment.
I mean how do i set the default to media instead of profile?example: check attachment
regards
A.
Attachments:
You must be logged in to view attached files.May 30, 2015 at 01:58 #60568dannicastanheiraParticipantLast reply, read carefully the other reply or change code:
function my_change_profile_tab_order() {
global $bp;$bp->bp_nav[‘profile’][‘position’] = 20;
$bp->bp_nav[‘media’][‘position’] = 10;
$bp->bp_nav[‘location’][‘position’] = 30;
$bp->bp_nav[‘activity’][‘position’] = 50;
$bp->bp_nav[‘friends’][‘position’] = 40;
$bp->bp_nav[‘notifications’][‘position’] = 60;
$bp->bp_nav[‘profile’][‘name’] = ‘Details’;
$bp->bp_nav[‘friends’][‘name’] = ‘Favorites’;
$bp->bp_nav[‘notifications’][‘name’] = ‘Inbox’;}
add_action( ‘bp_setup_nav’, ‘my_change_profile_tab_order’, 999 );May 30, 2015 at 02:12 #60569Alvin341965Participantthanks again but i get that and that works great.
but what i want = when i open profile page the first thing people will see is media and not profile info.
I will check forums again…kind regards
A.
May 30, 2015 at 02:21 #60570dannicastanheiraParticipantJuly 24, 2015 at 03:30 #69736viadsworldParticipantHi,
I tried adding this code to functions.php file but once added it activity page turns to a blank page.
cheers
July 24, 2015 at 04:15 #69743sharmstrModeratorIf you only want to move the media tab, does this one work for you? http://docs.rtcamp.com/rtmedia/developers/reordering-media-tab-buddypress.html
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.