Skip to:
Content
Pages
Categories
Search
Top
Bottom

How Do I Change Default Members Profile Landing Tab – Step by step?


  • cliffsuss
    Participant

    @cliffsuss

    Hello, There is this link:

    Change Default Members Profile Landing Tab


    for how to Change Default Members Profile Landing Tab

    But it is quite brief, and I am not very good at this, can someone just, very simply, guide me on how to do this step by step? Especailly the part on creating config.php or bp-custom.php on the plugin folder.

    Any help would be so much appreciated!

    Kind Regards

    Cliff

Viewing 11 replies - 1 through 11 (of 11 total)

  • cliffsuss
    Participant

    @cliffsuss

    okay, got it,

    1. From (in my case) your host’s homepage, find the CP file manager.

    2. in the manager, at the top, where there is a search bar, search for – wp-config.php.

    3. Read and remember where file is located. Next, go to it, and press edit.

    4. Once inside, there will be lots of text, look for ………DB_COLLATE’,”);

    5. paste the following code right after that, on the next line

    /**
    * Change BuddyPress default Members landing tab.
    */
    define(‘BP_DEFAULT_COMPONENT’, ‘profile’ );

    6. Save and its done!:)


    boundless_ink
    Participant

    @boundlessink

    Hello,

    How would I land on the BP Profile Page Subnav EDIT tab instead of Profile / View?

    I cant seem to find docs for this

    please assist if you can, ty in advance 🙂


    boundless_ink
    Participant

    @boundlessink

    This is not working for me

    function my_signup_redirect( $user_id, $user_login, $user_password, $user_email, $usermeta ) {
        wp_redirect( home_url() . '/members/' . $user_login . '/profile/edit/group/1/' );
        exit();
    }
    add_action( 'bp_core_signup_user', 'my_signup_redirect', 10, 5 );

    shanebp
    Moderator

    @shanebp

    afaik, when that hook runs, the user is not logged in yet. Try using a login hook, like login_redirect.
    btw – try to use BP functions, especially if you plan to distribute your code.
    wp_redirect( bp_loggedin_user_domain() . '/profile/edit/group/1/' );

    The default component constant applies to all visitors. Visitors and other members cannot edit the profile fields of another user.


    boundless_ink
    Participant

    @boundlessink

    i put this in the function.php child theme: is this correct code?

    function my_login_redirect( $user_id, $user_login, $user_password, $user_email, $usermeta ) {
        wp_redirect( bp_loggedin_user_domain() . '/profile/edit/group/2/' );
        exit();
    }
    add_action( 'login_redirect', 'my_login_redirect', 10, 5 );

    .. cant seem to get it to work.. i tried in bp-custom.php too.. maybe my code is not correct??


    boundless_ink
    Participant

    @boundlessink

    i just want to redirect the loggedin bp user to land on the EDIT tab to start editing.. this is so hard to do


    boundless_ink
    Participant

    @boundlessink

    Redirect users to buddypress profile edit page after sign up: TOPIC:

    this code: via https://buddypress.org/support/topic/redirect-users-to-buddypress-profile-edit-page-after-sign-up/

    .. this doesnt seem to work either.. @shanebp


    boundless_ink
    Participant

    @boundlessink

    what about this?

    function wps_redirect_bp_login() {
      if( is_user_logged_in() && bp_is_register_page() ) {
        bp_core_redirect( get_option('home') . '/members/' . $user_login . '/profile/edit/group/1/' );
      }
    }
    add_action( 'template_redirect', 'wps_redirect_bp_login', 1 );

    i cant seem to get this to work either ..


    boundless_ink
    Participant

    @boundlessink

    ANSWER IS:

    function admin_default_page() {
        global $user;
        return bp_core_get_user_domain( $user->ID ).'/profile/edit/group/2/';
    }
    add_filter('login_redirect', 'admin_default_page');

    Ahmad Sarif
    Participant

    @ahmadsarif

    Change the default profile page and how about its css to make it looks the way we want?


    dalemcgregor
    Participant

    @dalemcgregor

    I am having a similar problem. When users login, they are directed to the Members page instead of the Activity page. How could this be fixed?

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Skip to toolbar