Just one community button with submenus

How can I put in just one button the Activity Stream, Forum and Groups?
by default the appear separately but I would like to have them in a sub menu, maybe under a button call community.
thanks.

  • Tammie

    @botaniq: You would have to do 2 things: 1 make a list and 2 use a drop down script like is used in the top navigation. The code you'd have to modify and it's a custom edit so we can only point you to what to change is in includes/main-navigation.php:

    <?php if( $bp_existed == 'true' ) { //check if bp existed ?>
    
    		<?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 endif; ?>
    
    	<?php if ( bp_is_active( 'forums' ) && bp_is_active( 'groups' ) && ( 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 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; ?>

    If you notice you have a list above that?
    ...well my suggestion would be to follow this format however you'll have to test this and may need a drop down script in addition if the one there doesn't work.

    <li>Community
    <ul>
    ... your navigation here
    </ul>
    </li>

    Also make sure you've got the navigation appearing up top not in the footer for this to work.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.