Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change Default Landing Tab

  • Avatar of iamdhunt
    iamdhunt
    Participant

    @iamdhunt

    I know with this function below I can change the default landing tab when visiting a profile. Is there a way that I can have this be the case only when visiting another users profile but still have activity be the default on your own profile.

    define(“BP_DEFAULT_COMPONENT”,”profile”);

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of @modemlooper
    @modemlooper
    Moderator

    @modemlooper

    You write a function to test if logged in user is displayed user.

    if (  bp_loggedin_user_id()  ==  bp_displayed_user_id()  ) {

    define(“BP_DEFAULT_COMPONENT”,”profile”);

    }

    Avatar of 3rdaxis
    3rdaxis
    Participant

    @3rdaxis

    @modemlooper

    I tried to use your code and while just using define(“BP_DEFAULT_COMPONENT”,”profile”);

    using

    if (  bp_loggedin_user_id()  ==  bp_displayed_user_id()  ) {
    
    define(“BP_DEFAULT_COMPONENT”,”profile”);
    
    }

    returns an error
    Fatal error: Call to undefined function bp_loggedin_user_id()

    Could you help me with this?

    Thanks

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

You must be logged in to reply to this topic.