The MU forums have moved to WordPress.org

How to Customize BuddyPress Navigation (2 posts)

  1. dainismichel
    Member
    Posted 14 years ago #

    OK, Here's what I had in my copy of bp-sn-parent named bp-sn-parent-members in header.php

    <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 endif; ?>>
    
    				<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 endif; ?>>
    
    				<a href="<?php echo get_option('home') ?>/<?php echo BP_HOME_BLOG_SLUG ?>" title="<?php _e( 'Blog', 'buddypress' ) ?>"><?php _e( 'Blog', 'buddypress' ) ?></a></li>
    
    				<li<?php if ( bp_is_page( BP_MEMBERS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
    
    				<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 endif; ?>>
    
    					<a href="<?php echo get_option('home') ?>/<?php echo BP_GROUPS_SLUG ?>" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?></a></li>
    				<?php endif; ?>
    
    				<?php if ( function_exists( 'groups_install' ) && ( function_exists( 'bp_forums_setup' ) && !(int) get_site_option( 'bp-disable-forum-directory' ) ) ) : ?>
    
    					<li<?php if ( bp_is_page( BP_FORUMS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
    
    					<a href="<?php echo get_option('home') ?>/<?php echo BP_FORUMS_SLUG ?>" title="<?php _e( 'Forums', 'buddypress' ) ?>"><?php _e( 'Forums', 'buddypress' ) ?></a></li>
    				<?php endif; ?>
    
    				<?php if ( function_exists( 'bp_blogs_install' ) ) : ?>
    
    					<li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
    
    					<a href="<?php echo get_option('home') ?>/<?php echo BP_BLOGS_SLUG ?>" title="<?php _e( 'Blogs', 'buddypress' ) ?>"><?php _e( 'Blogs', 'buddypress' ) ?></a></li>
    				<?php endif; ?>
    
    				<?php do_action( 'bp_nav_items' ); ?>
    			</ul>
    
    			<?php do_action( 'bp_header' ) ?>
    
    		</div>

    It made most sense to me that even if my users are in their own blogs, that the menu items do the following

    Home ==> Site Home,
    Blog ==> That member's blog
    Members ==> Site Members
    Groups ==> Site Groups
    Forums ==> Site Forums
    Blogs ==> Site Blogs

    So this is what I did.

    <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>				
    
    				<a href="http://community.urine-therapy.org/">Home</a></li>
    
    				<li class="selected">
    
    				<a href="<?php echo get_option('home') ?>/" title="<?php _e( 'Blog', 'buddypress' ) ?>"><?php _e( 'Blog', 'buddypress' ) ?></a></li>
    
    				<li>
    				<a href="http://community.urine-therapy.org/members/">Members</a></li>
    
    					<li>
    					<a href="http://community.urine-therapy.org/groups/">Groups</a></li>
    
    					<li>
    					<a href="http://community.urine-therapy.org/forums/">Forums</a></li>
    
    					<li>
    					<a href="http://community.urine-therapy.org/blogs/">Blogs</a></li>
    
    				<?php do_action( 'bp_nav_items' ); ?>
    			</ul>
    
    			<?php do_action( 'bp_header' ) ?>
    
    		</div>
  2. SteveAtty
    Member
    Posted 14 years ago #

    Wouldn't the Buddypress forums be the best place for this?

About this Topic

  • Started 14 years ago by dainismichel
  • Latest reply from SteveAtty