This topic has 5 replies, 3 voices, and was last updated 11 years by sealagency.

  • Author
  • #39625
     sealagency
    Participant

    Hello Laura,

    I try to change the order of items on this menu
    I currently have:
    “Activités Profil Notifications Messages Amis Forums Q&A Réglages Events Media Petites annonces”

    I would
    Profil Notifications Messages Amis Forums Q&A Réglages du Profil Evennements Media Petites annonces Activités
    So change the order (Profil, activité) and incidentally the wording of elemnts (Evennements, Réglage du profil)
    With “Profil” open by default.
    How i can do that?

    Thanks very much

    #39628
     sealagency
    Participant

    I see this post https://archived.seventhqueen.com/forums/topic/buddypress-profile-landing-page-change
    but apparently this solution poses big problem 🙁

    #39641
     Laura
    Moderator

    Hello, go to plugins folder in your ftp, locate bp-custom.php and add this after <?php and before ?>

    COPY CODE
    
    define(‘BP_DEFAULT_COMPONENT’,’profile’);
    global $bp;
    $bp->bp_nav[‘profile’][‘position’] = 10;
    $bp->bp_nav[‘notifications’][‘position’] = 20;
    $bp->bp_nav[‘messages’][‘position’] = 30;
    $bp->bp_nav[‘friends’][‘position’] = 40;
    $bp->bp_nav[‘forum’][‘position’] = 50;
    $bp->bp_nav[‘posts’][‘position’] = 60;
    $bp->bp_nav[‘groups’][‘position’] = 70;
    $bp->bp_nav[‘activity’][‘position’] = 80;
    $bp->bp_nav[‘settings’][‘position’] = 90;
    }
    add_action( ‘bp_init’, ‘tricks_change_bp_tag_position’, 999 );
    }
    add_action( ‘wp_head’, ‘tricks_change_bp_tag_position’,9 );
    

    If this code doesnt move ALL ,then please tell me what are the following:
    Q&A
    Réglages du Profil
    Evennements
    Petites annonces

    I mean their original name. Not translated or the plugin that added it

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

    Hello,

    This code is strange there are tow } orphaned:

    COPY CODE
    global $bp;
    $bp->bp_nav[‘profile’][‘position’] = 10;
    $bp->bp_nav[‘notifications’][‘position’] = 20;
    $bp->bp_nav[‘messages’][‘position’] = 30;
    $bp->bp_nav[‘friends’][‘position’] = 40;
    $bp->bp_nav[‘forum’][‘position’] = 50;
    $bp->bp_nav[‘posts’][‘position’] = 60;
    $bp->bp_nav[‘groups’][‘position’] = 70;
    $bp->bp_nav[‘activity’][‘position’] = 80;
    $bp->bp_nav[‘settings’][‘position’] = 90;
    }
    add_action( ‘bp_init’, ‘tricks_change_bp_tag_position’, 999 );
    }
    add_action( ‘wp_head’, ‘tricks_change_bp_tag_position’,9 );

    I try to complete and fix with

    COPY CODE
    define(‘BP_DEFAULT_COMPONENT’,’profile’);
    function kleo_change_profil_tab() {
    global $bp;
    $bp->bp_nav[‘profile’][‘position’] = 10;
    $bp->bp_nav[‘notifications’][‘position’] = 20;
    $bp->bp_nav[‘messages’][‘position’] = 30;
    $bp->bp_nav[‘friends’][‘position’] = 40;
    $bp->bp_nav[‘forum’][‘position’] = 50;
    $bp->bp_nav[‘posts’][‘position’] = 60;
    $bp->bp_nav[‘groups’][‘position’] = 70;
    $bp->bp_nav[‘activity’][‘position’] = 80;
    $bp->bp_nav[‘settings’][‘position’] = 90;
    }
    add_action( ‘bp_init’, ‘tricks_change_bp_tag_position’, 999 );
    
    add_action( ‘wp_head’, ‘tricks_change_bp_tag_position’,9 );

    no modification
    the file to edit is wp-content/plugins/bp-custom.php is not it?

    #40084
     Abe
    Keymaster

    Hi, yes the file is wp-content/plugins/bp-custom.php

    so as in
    https://archived.seventhqueen.com/forums/topic/buddypress-profile-landing-page-change/#post-2418
    the code to add should be

    COPY CODE
    
    function 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;
    
    $bp->bp_nav['activity']['name'] = 'Wall';
    $bp->bp_nav['profile']['name'] = 'My profile';
    }
    add_action( 'bp_setup_nav', 'kleo_change_profile_tab', 999 );
     
    define( 'BP_DEFAULT_COMPONENT', 'profile' );
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #40560
     sealagency
    Participant

    Hello,

    very well is ok for my with this code :

    COPY CODE
    function kleo_change_profile_tab() {
    global $bp;
    
    $bp->bp_nav['profile']['position'] = 10;
    $bp->bp_nav['activity']['position'] = 20;
    
    $bp->bp_nav['activity']['name'] = 'Activités';
    $bp->bp_nav['q-and-a']['name'] = 'Q&R';
    $bp->bp_nav['profile']['name'] = 'Profil';
    // événement traduit dans wp-content/plugins/events-and-bookings/languages/eab-fr_FR.po
    }
    add_action( 'bp_setup_nav', 'kleo_change_profile_tab', 999 );
    define( 'BP_DEFAULT_COMPONENT', 'profile' );
    
Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?