hi @tallerwp,
this is documented in Codex. Read here:
Navigation API
You can aso find other examples by searching the forum.
Yes! I have tried all steps but impossible, nothing work. 🙁
Sorry buddy, but “nothing work” is not an answer and doesn’t help to go further! What have you tried and where ? Give details please!
Yes, It´s true, I am sorry
I have created the bp-custom.php inside plugin folder.
then I have added this code between php
function bpfr_remove_nav_tabs() {
bp_core_remove_nav_item( 'activity' );
// and so on for each item you want to remove
}
add_action( 'bp_setup_nav', 'bpfr_remove_nav_tabs', 15 );
But the activity options is visible 🙁
Activity is the default tab when you are on a profile. If you want to remove it, you must first define a new default landing tab.
Details in this topic.
Just in case of, bp-custom.php file doesn’t need a CLOSING php tag.
O_o it is very difficult for me, but “activity” was just an example, If I want to remove a no default option? For example “docs”.
In my buddypress show “docs” because I installed BuddyPress Docs plugin.
function bpfr_remove_nav_tabs() {
bp_core_remove_nav_item( 'docs' );
// and so on for each item you want to remove
}
add_action( 'bp_setup_nav', 'bpfr_remove_nav_tabs', 15 );
Hi, I’m also looking for a way to hide “forum” but nothing. I have to build myself a function but still nothing. Best wishes to you.
@neijisly Do you have any solution??? 🙁
If you add in functions.php this code
function remove_nav_items() {
bp_core_remove_nav_item( 'forums' );
}
add_action( 'bp_setup_nav', 'remove_nav_items',301);
You can remove the forum options in horizontal menu, but in vertical menu (profile user) no.
I am trying it with css, but it is impossible
li#wp-admin-bar-my-account-social-forums.menupop {display:none !important;}
BuddyPress’s toolbar menu works like any other toolbar sub-menu item.
See WP codex for details
Read here for some usage examples explained in details:
How to hide / remove the General tab under Settings
@tallerwp your code is functional. thank’s very much