Skip to:
Content
Pages
Categories
Search
Top
Bottom

Is possible hide some tabs in profiles??


  • Laura N
    Participant

    @tallerwp

    I don´t know how can I remove or hide tabs in profile. For example I want to remove activity, groups and docs tabs.

    Can I remove them?

Viewing 12 replies - 1 through 12 (of 12 total)

  • danbp
    Moderator

    @danbp

    hi @tallerwp,

    this is documented in Codex. Read here:

    Navigation API

    You can aso find other examples by searching the forum.


    Laura N
    Participant

    @tallerwp

    Yes! I have tried all steps but impossible, nothing work. 🙁


    danbp
    Moderator

    @danbp

    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!


    Laura N
    Participant

    @tallerwp

    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 🙁


    danbp
    Moderator

    @danbp

    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.


    Laura N
    Participant

    @tallerwp

    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 );

    neijisly
    Participant

    @neijisly

    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.


    Laura N
    Participant

    @tallerwp

    @neijisly Do you have any solution??? 🙁


    neijisly
    Participant

    @neijisly

    no @tallerwp nothing.


    Laura N
    Participant

    @tallerwp

    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;}


    danbp
    Moderator

    @danbp

    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


    neijisly
    Participant

    @neijisly

    @tallerwp your code is functional. thank’s very much

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.
Skip to toolbar