Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hiding Groups Menus

  • Avatar of karthikskr
    karthikskr
    Member

    @karthikskr

    Hi,
    Thanks for this great courseware plugin.

    I am using WordPress 3.2.1 and Buddypress 1.5.1

    I have been trying to hide the groups tab with the below function.


    function hide_group_menus(){
    global $bp;
    // Check if Courseware is enabled
    if( !defined( 'BPSP_VERSION' ) )
    return;

    if( !bp_group_is_admin() ) {
    // hide main 'noisy' menus
    $bp->bp_options_nav = $bp->bp_options_nav->courseware;

    if( $bp->current_component == $bp->groups->slug && $bp->current_action != $bp->courseware->slug )
    // go directly to Courseware tab
    bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . $bp->courseware->slug );
    }
    }

    add_action( 'wp', 'hide_group_menus' );

    But i can’t fix it.

    Please help me in this

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Hiding Groups Menus’ is closed to new replies.