Skip to:
Content
Pages
Categories
Search
Top
Bottom

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


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

Skip to toolbar