editing community menu

how can i go about editing the horizontal menu item Community, when i go to appearance > menu’s it only lists the items that I manually added

  • Timothy
    • Chief Pigeon

    Hey there.

    That put in there automatically for BuddyPress. To remove it you would need to edit some code. Open file:

    /framemarket/header.php

    Around line 69 remove all of the following:

    <?php if($bp_existed == 'true') : ?>
    <ul class="nav">
    <li><a href="">Community</a>
    <ul class="submenu">
    <?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', 'framemarket' ) ?>"><?php _e( 'Activity', 'framemarket' ) ?></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', 'framemarket' ) ?>"><?php _e( 'Members', 'framemarket' ) ?></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', 'framemarket' ) ?>"><?php _e( 'Groups', 'framemarket' ) ?></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', 'framemarket' ) ?>"><?php _e( 'Forums', 'framemarket' ) ?></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', 'framemarket' ) ?>"><?php _e( 'Blogs', 'framemarket' ) ?></a>
    </li>
    <?php endif; ?>
    <?php do_action( 'bp_nav_items' ); ?>
    </ul>
    </li>
    </ul>
    <?php endif; ?>

  • tfbc
    • Site Builder, Child of Zeus

    ok thank you, that helps, you have there

    <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', 'framemarket' ) ?>"><?php _e( 'Blogs', 'framemarket' ) ?></a>
    </li>

    even though i changed the slug name to something other than blog, it still shows in that menu as blogs, would i need to edit the word blogs in that code to the new slug name? or is it suppose to auto change that when i edit the actual page slug in buddypress?

  • Timothy
    • Chief Pigeon

    Hey again.

    BP_BLOGS_SLUG – Will get the blog slug you create or change it to.

    bp_is_page( ) – This will check if its a BuddyPress page, the argument it takes is the slug.

    I’m not sure I understand the rest of your questions, could you please elaborate?

    Thanks.