Buddypress Navbar Options

Hi there,

I have turned ON the Buddypress (and bbpress) Navbar selection in X Options - they’re great, but they showed up on all three of our menus. We have three menus defined in Menus, is it possible to select which of the menu bars these navigation items are added to - or, update to have them only displayed on one of the menu bars?

Many thanks :blush:

Hey @DeeDesign,

Regretfully, there is no option to restrict BuddyPress and bbPress menu items. It’s only possible programatically. That, however, requires that you have WordPress development knowledge. I’ll provide how our theme adds the BuddyPress menus but overriding it should be done by a WordPress developer.

The code responsible for adding the BuddyPress menu could be found in the buddypress.php file that is located in the theme’s \framework\functions\plugins folder.

The code is:

add_filter( 'wp_nav_menu_items', 'x_buddypress_navbar_menu', 9997, 2 );

x_buddypress_navbar_menu is the function that contains the menu markup and it’s attached to the WordPress wp_nav_menu_items hook which displays the menu items.

You’ll need to either override the x_buddypress_navbar_menu function with your own conditions or stop the function from attaching to the mentioned WP hook then attaching your own function based on certain conditions.

Hope that helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.