Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • @jonnyauk

    Participant

    Thanks @boonebgorges – that’s perfect!

    Just in-case anyone else comes across this, here is the complete final function for removing the various navigation items from the group menu in BP1.5:

    `function ja_remove_navigation_tabs() {
    bp_core_remove_subnav_item( bp_get_current_group_slug(), ‘send-invites’ );
    bp_core_remove_subnav_item( bp_get_current_group_slug(), ‘members’ );
    bp_core_remove_subnav_item( bp_get_current_group_slug(), ‘admin’ );
    }
    add_action( ‘bp_setup_nav’, ‘ja_remove_navigation_tabs’, 15 );`

    @jonnyauk

    Participant

    So, the above function works for other menus I’ve tried (under profile) – but I can’t interact with the ‘groups’ menu… I have tried the following in the function above:

    `bp_core_remove_subnav_item( ‘groups’, ‘send-invites’ );`
    (And with global $bp):
    bp_core_remove_subnav_item( $bp->groups->slug, ‘send-invites’ );

    The problem I have is that I need to retain the invites functionality in certain group situations – I’m happy with my conditional code for this – no problemo… but just can’t get the above function to interact at-all with the group menu – in-fact I can’t remove anything from this menu – but I can from others?

    Any help would be MUCH appreciated – I’m tearing my hear out on this one;(

    @jonnyauk

    Participant

    Ah, my mistake – this code does actually work HOWEVER , I can’t get it to hide ‘Send Invites’ or anything else under the group menu… do I have to do something different?

    `function ja_remove_navigation_tabs() {
    bp_core_remove_nav_item(‘friends’);
    bp_core_remove_nav_item(‘settings’);
    }
    add_action( ‘bp_setup_nav’, ‘ja_remove_navigation_tabs’, 15 );`

    @jonnyauk

    Participant

    As an aside (and to be complete on subject if someone comes across this issue!) you will obviously need to alter your template to remove the display of the group avatar – but this is simple template level code;)

    @jonnyauk

    Participant

    Thanks @DJPaul – you got my issue in one – I need to keep user avatars functionality, but disable group avatars and the creation step… so many thanks for your answer on this one;)

    Just to clarify, in-case someone comes across this issue – here is how I bundled Paul’s tidy code into a function (this is in my bp-custom.php file in /plugins)

    `
    function my_bp_remove_group_steps_init() {
    global $bp;
    unset( $bp->groups->group_creation_steps );
    }
    add_action( ‘bp_init’, ‘my_bp_remove_group_steps_init’, 10 );
    `

    The code above will remove the avatar step in group creation, and the ‘step numbers’ will respect that this has been removed – neat and exactly what I needed!

    You may also use the following to remove the group settings and group invites in the same function – although I have not done any testing on these:
    `unset( $bp->groups->group_creation_steps );`
    `unset( $bp->groups->group_creation_steps );`

    @jonnyauk

    Participant

    BUMP – Sorry – anyone got any tips on this – I really don’t want to hack it out of the core code, but really need to remove this step in the group creation process. It’s obviously easy enough not to display the Avatar as the display of this is at ‘theme’ level – but not the actual step in the group creation process (unless I’m wrong?).

Viewing 6 replies - 1 through 6 (of 6 total)
Skip to toolbar