Renaming Buddypress Pages

Hi
I have Buddypress 1.5.1 and I am using the 'Product' theme version 3.1.2. I associated the wordpress pages I named "Projects" and "Discussions" with the "Groups" and "Discussion Forums" Buddypress component directories respectively, thinking they would take the names given to the wordpress pages. Unfortunately that did not work. My question is - Is there a way to rename the pages within the Buddypress navigation bar. I uploaded my buddypress bar and what I would like to do is rename "Groups" to "Projects" and "Forums" to "Discussions"

Thanks Ali B.

  • Timothy
    • Chief Pigeon

    To change the BuddyPress pages you need to do so within the Buddy admin:

    /wp-admin/network/admin.php?page=bp-page-settings

    Admin --> Network Admin --> BuddyPress --> Pages

    For non network mode you obviously don't need to go into the Network Admin area.

    And don't forget in some themes you use the custom menu to define the nav links. If so then you need to change that under the Appearance options for your site.

  • Timothy
    • Chief Pigeon

    In the admin of WordPress if in single site most, you will find it down the left hand side of the admin, as shown in the image I attached.

    If the plugin was Network activated then you first navigate to Network Admin, it will then be on the right.

    This is assuming you are using the default WordPress admin theme.

    If its network then this on the end of your domain will work:

    /wp-admin/network/admin.php?page=bp-page-settings

  • abasmaci
    • New Recruit

    Oh ok, yes I did change that before posting my question. In the image attached you will see how I have set up the pages. But for some reason in the Buddypress Nav bar shows "Groups" instead of "Projects" and "Forums" instead of "Discussion" So would it be best if I used a custom menu instead as you also suggested

    Ali B

  • Timothy
    • Chief Pigeon

    Sorry for taking so long to get back to you. I was studying the code on this theme and that of the new 1.5 BuddyPress so I could be sure of the answer I give. Took me about a little while :slight_frown:

    The custom menu position which is available is only for the top bar within the "Products" theme.

    BuddyPress 1.5 changed how it does things a little. Diving into the templates on my install I went to:

    /public_html/wp-content/themes/product/library/components/buddypress/buddypress-navigation.php

    In here is the code which controls the BuddyPress menu within the "Products" theme.

    The code:

    <div id="buddypress-navigation">
    				<ul class="sf-menu">
    					<?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', 'product' ) ?>"><?php _e( 'Activity', 'product' ) ?></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', 'product' ) ?>"><?php _e( 'Members', 'product' ) ?></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', 'product' ) ?>"><?php _e( 'Groups', 'product' ) ?></a>
    						</li>
    						<?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', 'product' ) ?>"><?php _e( 'Forums', 'product' ) ?></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', 'product' ) ?>"><?php _e( 'Blogs', 'product' ) ?></a>
    						</li>
    					<?php endif; ?>
    					<?php do_action( 'bp_nav_items' ); ?>
    			</ul>
    			<div class="clear"></div>
    	</div>

    The following:

    BP_GROUPS_SLUG
    BP_BLOGS_SLUG
    BP_MEMBERS_SLUG
    BP_ACTIVITY_SLUG

    They all appeared to pull the old original slug. Tammy knows her themes and Buddy better than I so I will tag her and see if she has a better answer than I, or something more insightful than I offer here.

    But as a quick fix:

    <div id="buddypress-navigation">
    				<ul class="sf-menu">
    					<?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_get_root_slug( 'activity' ); ?>/" title="<?php _e( 'Activity', 'product' ) ?>"><?php _e( 'Activity', 'product' ) ?></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_get_root_slug( 'members' );  ?>/" title="<?php _e( 'Members', 'product' ) ?>"><?php _e( 'Members', 'product' ) ?></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_get_root_slug( 'groups' ); ?>/" title="<?php _e( 'Groups', 'product' ) ?>"><?php _e( 'Groups', 'product' ) ?></a>
    						</li>
    						<?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_get_root_slug( 'forums' );  ?>/" title="<?php _e( 'Forums', 'product' ) ?>"><?php _e( 'Forums', 'product' ) ?></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_get_root_slug( 'blogs' );  ?>/" title="<?php _e( 'Blogs', 'product' ) ?>"><?php _e( 'Blogs', 'product' ) ?></a>
    						</li>
    					<?php endif; ?>
    					<?php do_action( 'bp_nav_items' ); ?>
    			</ul>
    			<div class="clear"></div>
    	</div>

    For the sake of future upgrades you won't want to edit the themes actual files, instead create a child theme. Some information is here:

    https://premium.wpmudev.org/the-buddypress-manual/what-are-parent-and-child-themes/

  • Tammie
    • WordPress Wizard

    Whose Tammy? :slight_smile:

    I think it's getting a little overcomplicated though in your example lets see if we can just get a small hammer not missile to crack this problem.

    How about a custom language file just change those languages? It's the way I suggest users go rather than change files for simple text changes. Far easier than all that code.

  • Saunt Valerian
    • The Bug Hunter

    Info on custom language files: http://codex.buddypress.org/extending-buddypress/customizing-labels-messages-and-urls/

    Info on changing the slugs: http://codex.buddypress.org/extending-buddypress/changing-internal-configuration-settings/ (I think this is more to pre-1.5 era)

    This is a relatively common request, and it requires a little bit of work in setting up the language file, but is a reliable and upgrade friendly way of handling things. Hacking the core is always a bad way to do things, using language files is the modular way to handle it.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.