Skip to:
Content
Pages
Categories
Search
Top
Bottom

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

  • @hugodouchet

    Participant

    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)
  • @peterverkooijen

    Participant

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

    @hugodouchet

    Participant

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

    @modemlooper

    Moderator

    || !bp_current_component()

    I think you should move that to blogs.

    @hugodouchet

    Participant

    Hi Modemlooper,

    I think too, but dont works!! :(

    I move it to “profile” but no change.

    @apeatling

    Keymaster

    Simple. In wp-config.php:

    define( 'BP_DEFAULT_COMPONENT', 'profile' );

    @hugodouchet

    Participant

    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!

    @noriise

    Participant

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

    @jadportado

    Participant

    Hey, still works like magic! Thanks 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] Change default view in profile (BP 1.2)’ is closed to new replies.
Skip to toolbar