Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to change the position of Userbar and Optionbar


Ezd
Participant

@ezd

Socialpreneur: Ok thanks.

Would I have to edit the header.php for both the home and bpmember theme? So I would add the same code to both files?

<div id="header">
<h1 id="logo"><a href="<?php echo get_option('home') ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php bp_site_name() ?></a></h1>

<ul id="nav">
<li<?php if ( bp_is_page( 'home' ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php _e( 'Home', 'buddypress' ) ?></a></li>
<li<?php if ( bp_is_page( BP_HOME_BLOG_SLUG ) ) {?> class="selected"<?php } ?>><a href="<?php bp_home_blog_url() ?>" title="<?php _e( 'Blog', 'buddypress' ) ?>"><?php _e( 'Blog', 'buddypress' ) ?></a></li>
<li<?php if ( bp_is_page( BP_MEMBERS_SLUG ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo BP_MEMBERS_SLUG ?>" title="<?php _e( 'Members', 'buddypress' ) ?>"><?php _e( 'Members', 'buddypress' ) ?></a></li>

<?php if ( function_exists( 'groups_install' ) ) { ?>
<li<?php if ( bp_is_page( BP_GROUPS_SLUG ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo BP_GROUPS_SLUG ?>" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?></a></li>
<?php } ?>

<?php if ( function_exists( 'bp_blogs_install' ) ) { ?>
<li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo BP_BLOGS_SLUG ?>" title="<?php _e( 'Blogs', 'buddypress' ) ?>"><?php _e( 'Blogs', 'buddypress' ) ?></a></li>
<?php } ?>

<?php do_action( 'bp_nav_items' ); ?>
</ul>
</div>

If I wanted to add another menu-link would I have to add something like this to both header.php files? Saying the new page was called ‘pagename’:

<?php if ( function_exists( 'bp_pagename_install' ) ) { ?>
<li<?php if ( bp_is_page( BP_PAGENAME_SLUG ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo BP_PAGENAME_SLUG ?>" title="<?php _e( 'Pagename', 'buddypress' ) ?>"><?php _e( 'Pagename', 'buddypress' ) ?></a></li>
<?php } ?>

Or is this wrong? Just wanna make sure I do it right. :)

Skip to toolbar