This topic has 15 replies, 4 voices, and was last updated 8 years by sharmstr.

  • Author

    Tagged: 

  • #58881
     dannicastanheira
    Participant

    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 );

    ?>

    #58887
     sharmstr
    Moderator

    You 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-35607

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #58906
     dannicastanheira
    Participant

    Hi Sharmstr! I have checked botH topics before and applied the code both nothing happens. 🙁

    #58939
     sharmstr
    Moderator

    It 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 solution

    This 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.
    #60524
     Alvin341965
    Participant

    Hello 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.
    #60527
     dannicastanheira
    Participant

    Alvin 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’;

    #60562
     Alvin341965
    Participant

    thank 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 🙁

    #60563
     dannicastanheira
    Participant

    Forgot 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 );

    #60564
     Alvin341965
    Participant

    extra 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.

    #60565
     dannicastanheira
    Participant

    Change 10, 20, 30, 40 in the code to the order of fields you want to show up first. 10 = media and so on

    #60566
     Alvin341965
    Participant

    thank 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.
    #60568
     dannicastanheira
    Participant

    Last 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 );

    #60569
     Alvin341965
    Participant

    thanks 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.

    #60570
     dannicastanheira
    Participant
    #69736
     viadsworld
    Participant

    Hi,

    I tried adding this code to functions.php file but once added it activity page turns to a blank page.

    cheers

    #69743
     sharmstr
    Moderator

    If 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 solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 16 posts - 1 through 16 (of 16 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?