Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Change default view in profile (BP 1.2)

  • Avatar of hugodouchet
    hugodouchet
    Participant

    @hugodouchet

    Hi all,

    My BP works great now (thanks for BP forum members help).

    Now, i would like to show by default the profile view when viewing member profile (by default it’s the “Activity” tab).

    I use BP 1.2

    Thank’s a lot

Viewing 8 replies - 1 through 8 (of 8 total)
  • Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    Change the template tags in the template files, I think profile/index.php

    Avatar of hugodouchet
    hugodouchet
    Participant

    @hugodouchet

    Hi

    I don’t know how to do.

    The default profile index :

    <div id="item-body">

    <?php if ( bp_is_user_blogs() ) : ?>

    <?php locate_template( array( 'members/single/blogs.php' ), true ) ?>

    <?php elseif ( bp_is_user_profile() ) : ?>

    <?php locate_template( array( 'members/single/profile.php' ), true ) ?>

    <?php elseif ( bp_is_user_activity() || !bp_current_component() ) : ?>

    <?php locate_template( array( 'members/single/activity.php' ), true ) ?>

    <?php elseif ( bp_is_user_friends() ) : ?>

    <?php locate_template( array( 'members/single/friends.php' ), true ) ?>

    <?php elseif ( bp_is_user_groups() ) : ?>

    <?php locate_template( array( 'members/single/groups.php' ), true ) ?>

    <?php elseif ( bp_is_user_messages() ) : ?>

    <?php locate_template( array( 'members/single/messages.php' ), true ) ?>

    <?php endif; ?>

    <?php do_action( 'bp_directory_members_content' ) ?>

    </div><!-- #item-body -->

    And my try (but seems dont work) :

    <div id="item-body">

    <?php if ( bp_is_user_blogs() ) : ?>

    <?php locate_template( array( 'members/single/blogs.php' ), true ) ?>

    <?php elseif ( bp_is_user_profile() || !bp_current_component() ) : ?>

    <?php locate_template( array( 'members/single/profile.php' ), true ) ?>

    <?php elseif ( bp_is_user_activity() ) : ?>

    <?php locate_template( array( 'members/single/activity.php' ), true ) ?>

    <?php elseif ( bp_is_user_friends() ) : ?>

    <?php locate_template( array( 'members/single/friends.php' ), true ) ?>

    <?php elseif ( bp_is_user_groups() ) : ?>

    <?php locate_template( array( 'members/single/groups.php' ), true ) ?>

    <?php elseif ( bp_is_user_messages() ) : ?>

    <?php locate_template( array( 'members/single/messages.php' ), true ) ?>

    <?php endif; ?>

    <?php do_action( 'bp_directory_members_content' ) ?>

    </div><!-- #item-body -->

    Avatar of @modemlooper
    @modemlooper
    Moderator

    @modemlooper

    || !bp_current_component()

    I think you should move that to blogs.

    Avatar of hugodouchet
    hugodouchet
    Participant

    @hugodouchet

    Hi Modemlooper,

    I think too, but dont works!! :(

    I move it to “profile” but no change.

    Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    Simple. In wp-config.php:

    define( 'BP_DEFAULT_COMPONENT', 'profile' );

    Avatar of hugodouchet
    hugodouchet
    Participant

    @hugodouchet

    Hi Andy,

    You’re the best!! :D

    Yeah, it’s so simple when we have answers… :p

    Thanks for your job, all Automatic projects rocks!

    Good luck for the next!

    Avatar of noriise
    noriise
    Participant

    @noriise

    It’s all about 3 year old posts. Just to say, better to add this to functions.php

    Avatar of Jad
    Jad
    Participant

    @jadportado

    Hey, still works like magic! Thanks :)

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

You must be logged in to reply to this topic.