This topic has 11 replies, 6 voices, and was last updated 8 years by Abe.

  • Author
  • #6106
     JohnDoe
    Participant

    I tried to modify ur code for hiding the forum ,

    // Remove forums menu item
    function my_setup_nav() {
    global $bp;

    unset($bp->bp_nav[‘forums’]);
    }

    add_action( ‘bp_setup_nav’, ‘my_setup_nav’, 1000 );

    Too

    // Remove activity menu item
    function my_setup_nav() {
    global $bp;

    unset($bp->bp_nav[‘activity’]);
    }

    add_action( ‘bp_setup_nav’, ‘my_setup_nav’, 15 );

    But that gives me an error, i once had a code to remove it , but when u load a profile , it still loads the Activity, but just doesn’t show it on the profile nav .

    Would be very happy with a fix.

    #6167
     adam
    Participant

    hey – make sure you don’t already have a function called my_setup_nav in your functions.php file.
    also, check out this topic if you haven’t already:
    https://archived.seventhqueen.com/forums/topic/hide-profile
    i share my code on there that removes the activity.

    #6201
     JohnDoe
    Participant

    i do have have a function for that allready since i removed the forums tab, how can i remove 2 then?

    #6203
     adam
    Participant

    try this:

    COPY CODE
    
    function my_remove_activity() {
    global $bp;
    
    $bp->bp_nav['activity'] = false;
    }
    
    add_action( ‘bp_setup_nav’, ‘my_remove_activity’ );
    
    #6205
     JohnDoe
    Participant

    No error, but still shows it Adam

    #6215
     SQadmin
    Keymaster

    Hi,
    This code works

    COPY CODE
    
    
    function my_remove_profile_nav() {
        global $bp;
    	bp_core_remove_nav_item( 'activity' );
    }
    add_action( 'bp_setup_nav', 'my_remove_profile_nav' );
    

    Also removing the activity, which is the default component that shows when you are viewing a profile you will have a 404 page. See this to change the default component:
    https://archived.seventhqueen.com/forums/topic/buddypress-profile-landing-page-change

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #6218
     JohnDoe
    Participant

    o i allready added

    define( ‘BP_DEFAULT_COMPONENT’, ‘profile’ );

    in wp-config.php before.

    Now

    // Remove forums menu item
    function my_setup_nav() {
    global $bp;

    unset($bp->bp_nav[‘forums’]);
    }

    add_action( ‘bp_setup_nav’, ‘my_setup_nav’, 1000 );

    Doesn’t remove the forums anymore.. :p

    #6300
     SQadmin
    Keymaster

    This is the topic for hiding the forums.. https://archived.seventhqueen.com/forums/topic/how-do-i-remove-the-forums-tab

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #35153
     Parkproductions
    Participant

    Is there a thread for removing items from group pages? I need to get rid of members and send invites from invite-anyone plugin

    #35209
     Abe
    Keymaster

    I don’t know about that. try to edit groups templates. all related templates are in the theme folder under groups folder

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #89915
     Loyal_Customer
    Participant

    Hello,

    The link provided above is inactive (https://archived.seventhqueen.com/forums/topic/how-do-i-remove-the-forums-tab).
    Can you please tell me which code works for hiding the “forums” tab on profiles.

    Thank you.

    #92935
     Abe
    Keymaster

    the link should work now. Thanks

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

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

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?