How to create submenu containing BuddyPress tabs (editing header.php)?
-
Hi
The details are as follows:
- WordPress Version: MultiUser 2.9.2
- BuddyPress Version: 1.2.2.1
- Theme: Avenue K9, Michael Kuhlmann’s B2 Theme Pack (Theme works fine)
- I have used WordPress for a few months only.
- I am a BuddyPress newbie.
- I know some HTML.
- I do not know PHP at all.
Hi again

I really need urgent help in editing /wp-content/plugins/buddypress/bp-themes/bp-default/header.php as I am in a hurry to meet the deadline.
I want to move the Activity, Members, Groups and all the other BuddyPress links into a list item called “Community”.
If that is possible, please let me know how to do it (my code is shown below, which doesn’t work), if not, please recommend a theme that I can acheive this functionality with, be it a Buddymatic theme or not.
To give you a better understanding, my sitemap is shown below:
- Home
- Community
- Activity
- Members
- Groups
- Forums
- Blogs
- Expositions
- Secondary 1
- Secondary 2
- Secondary 3
- Secondary 4
- Secondary 5
- Creative Expressions
- Secondary 1
- Secondary 2
- Secondary 3
- Secondary 4
- Secondary 5
- Situational Writing
- Secondary 1
- Secondary 2
- Secondary 3
- Secondary 4
- Secondary 5
- Useful Links
- Contact Us
My code (which of course does not work since I’m a newbie) loooks like this:
<div id="header">
<h1 id="logo"><a href="<?php echo site_url() ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php bp_site_name() ?></a></h1>
<ul id="nav">
<li <?php echo site_url() ?>" title="<?php _e( 'Community', 'buddypress' ) ?>">
<ul title="Community">
<li<?php if ( bp_is_front_page() ) : ?> class="selected"<?php endif; ?>>
<a href="<?php echo site_url() ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php _e( 'Home', 'buddypress' ) ?></a>
</li>
<?php if ( 'activity' != bp_dtheme_page_on_front() && bp_is_active( 'activity' ) ) : ?>
<li<?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?> class="selected"<?php endif; ?>>
<a href="<?php echo site_url() ?>/<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( 'Activity', 'buddypress' ) ?>"><?php _e( 'Activity', 'buddypress' ) ?></a>
</li>
<?php endif; ?>
<li<?php if ( bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ) : ?> class="selected"<?php endif; ?>>
<a href="<?php echo site_url() ?>/<?php echo BP_MEMBERS_SLUG ?>/" title="<?php _e( 'Members', 'buddypress' ) ?>"><?php _e( 'Members', 'buddypress' ) ?></a>
<li>
<?php if ( bp_is_active( 'groups' ) ) : ?>
<li<?php if ( bp_is_page( BP_GROUPS_SLUG ) || bp_is_group() ) : ?> class="selected"<?php endif; ?>>
<a href="<?php echo site_url() ?>/<?php echo BP_GROUPS_SLUG ?>/" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?></a>
</li>
<?php if ( bp_is_active( 'forums' ) && ( function_exists( 'bp_forums_is_installed_correctly' ) && !(int) bp_get_option( 'bp-disable-forum-directory' ) ) && bp_forums_is_installed_correctly() ) : ?>
<li<?php if ( bp_is_page( BP_FORUMS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
<a href="<?php echo site_url() ?>/<?php echo BP_FORUMS_SLUG ?>/" title="<?php _e( 'Forums', 'buddypress' ) ?>"><?php _e( 'Forums', 'buddypress' ) ?></a>
</li>
<?php endif; ?>
<?php endif; ?>
<?php if ( bp_is_active( 'blogs' ) && bp_core_is_multisite() ) : ?>
<li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
<a href="<?php echo site_url() ?>/<?php echo BP_BLOGS_SLUG ?>/" title="<?php _e( 'Blogs', 'buddypress' ) ?>"><?php _e( 'Blogs', 'buddypress' ) ?></a>
</li>
<?php endif; ?>
</ul>
</li>
<?php wp_list_pages( 'title_li=&depth=1&exclude=' . bp_dtheme_page_on_front() ); ?>
<?php do_action( 'bp_nav_items' ); ?>
</ul><!-- #nav -->
<div id="search-bar">
<div class="padder">
<form action="<?php echo bp_search_form_action() ?>" method="post" id="search-form">
<input type="text" id="search-terms" name="search-terms" value="" />
<?php echo bp_search_form_type_select() ?>
<input type="submit" name="search-submit" id="search-submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
<?php wp_nonce_field( 'bp_search_form' ) ?>
</form><!-- #search-form -->
<?php do_action( 'bp_search_login_bar' ) ?>
<div><!-- .padder -->
</div><!-- #search-bar -->
<?php do_action( 'bp_header' ) ?>
</div><!-- #header -->Can someone please help me to acheive this (by showing the code please)?
Thank you very much for everyone’s help!
Rayner
You must be logged in to reply to this topic.
