Tip: improve top nav – add My Profile which includes activity and profile
This is just a quick hint on how to improve the top navigation to be more user friendly. (and more similar to facebook, which people are familiar with)
The top nav in the new BuddyPress theme is great. I love the simple rounded tabs. I like the very admin bar as well, but it is hidden, so new users don’t see it right away. I replaced the top Activity tag with My Profile and linked this page to the My Account page, thereby quickly giving users the ability to see all their settings and activity in one place.
you first need to create a child theme if you’ve not already done so. Any live site will want to look different and use a child theme. There is a great tutorial on how to do that here: http://codex.buddypress.org/how-to-guides/building-a-buddypress-child-theme/
next edit the header.php in your child theme.
find the 6 lines of code pertaining to the activity tab starting on line 51:
<?php if ( 'activity' != bp_dtheme_page_on_front() && bp_is_active( 'activity' ) ) : ?>
replace that 6 line chunk with this
<li<?php if ( bp_loggedin_user_id() == bp_displayed_user_id() ) : ?> class="selected"<?php endif; ?>>
<a href="<?php echo bp_loggedin_user_domain() ?>" title="<?php _e( 'My Profile', 'buddypress' ) ?>"><?php _e( 'My Profile', 'buddypress' ) ?></a>
edit the name of the tab in the above code as you see fit, maybe you want ‘My Account’ or ‘Activity & Profile’ whatever.
finally, a little further down, change this line
<li<?php if ( bp_is_page( BP_GROUPS_SLUG ) || bp_is_group() ) : ?> class="selected"<?php endif; ?>>
<li<?php if ( ( bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ) && ( bp_loggedin_user_id() != bp_displayed_user_id() ) ) : ?> class="selected"<?php endif; ?>>
that just makes it so that two tabs are not highlighted at the same time.
- The topic ‘Tip: improve top nav – add My Profile which includes activity and profile’ is closed to new replies.