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.


  • botaniq
    • WPMU DEV Initiate

    hi thanks, yes, the main menu comes with home, activity, groups, forum, members… by default.

    I would like to have just the button home and one button call for example “community” where you can find sub menus with groups, forums, members..etc..

    normally I do it with pages and subpages but the group, forum, activity… seams they do not have that option..

  • botaniq
    • WPMU DEV Initiate

    in the admin bar there is this community button that I want but in the home-page menu you have all the buddypress components displayed one by one and not in a submenu like in the admin bar. I would like to have the same community button in the admin bar but in the homepage :wink:

  • Mason
    • DEV MAN’s Sidekick


    Definitely possible, but will need a bit of customization to get working properly.

    I don’t have this theme on a test install right at the moment, but myself or one of the theme designers will get back to you with some suggestions shortly.

    Thanks for your patience :smiley:

  • Tammie
    • WordPress Wizard

    @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>
    <?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>

    <?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>
    <?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>
    <?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>
    <?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.

    ... your navigation here

    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.