Support » Plugin: Events Manager » remove Events menu from BuddyPress profile menus

  • Resolved yoluca

    (@yoluca)


    would like to remove events menu from BuddyPress profile menus …

    i tried

    function my_remove_em_nav() {
    global $bp;
    bp_core_remove_subnav_item($bp->groups->slug,’group-events’);
    bp_core_remove_subnav_item($bp->groups->current_group->slug,’events’);
    }
    add_action( ‘init’, ‘my_remove_em_nav’ );

    but doesnt work ..

    am i doing anything wrong ?

    https://wordpress.org/plugins/events-manager/

Viewing 15 replies - 1 through 15 (of 20 total)
  • also in ” user capabilities ” nothing is selected ..

    could not find anything in events settings to disable the events menu from buddypress

    thanks

    Plugin Support angelo_nwl

    (@angelo_nwl)

    I tried that alteady .. Doesnt work ..

    Thanks

    Hiya,

    What versions of WordPress/BuddyPress/EM are you using please?

    Thanks

    wp = 3.8.1
    bd = 1.9.2
    em = 5.5.2

    Thank you

    Plugin Support caimin_nwl

    (@caimin_nwl)

    Have you tried @agelonwl’s second snippet – that should work. It needs to go at the end of the functions.php file of your theme.

    `/* remove events tab in buddypress */
    function my_remove_em_nav() {
    global $bp;

    bp_core_remove_subnav_item($bp->groups->slug,’group-events’);
    bp_core_remove_nav_item( ‘events’ );

    }
    add_action( ‘bp_setup_nav’, ‘my_remove_em_nav’ );

    this is what i have in functions.php at the very bottom … nothing else after ..

    thanks

    Do you see this anywhere in your functions.php?:
    ?>

    If so, and it’s BEFORE the snippet above, move it to the very end.

    Thanks

    ok i have added that

    /* remove events tab in buddypress */
    function my_remove_em_nav() {
    global $bp;

    bp_core_remove_subnav_item($bp->groups->slug,’group-events’);
    bp_core_remove_nav_item( ‘events’ );

    }
    add_action( ‘bp_setup_nav’, ‘my_remove_em_nav’ );

    ?>

    this is my last entry in functions.php

    thanks

    Plugin Support caimin_nwl

    (@caimin_nwl)

    This shouldn’t make any difference but are you using a child theme? Can you share a link to your site?

    no child theme …

    regatulunit.com

    Plugin Support angelo_nwl

    (@angelo_nwl)

    you can also try this

    function my_func_remove_xprofile_tabs(){
      global $bp;
      bp_core_remove_nav_item('events');
    }
    add_action( 'bp_setup_nav', 'my_func_remove_xprofile_tabs', 15 );

    sorry , but its still not working … i can still see ” events ” tab in buddypress

    thanks

    Plugin Support caimin_nwl

    (@caimin_nwl)

    Can you switch to the default WordPress theme and test Angelo’s code in the functions.php file?

    This code works in functions.php of your active theme, as I just came here looking for a solution but found the code elsewhere first. I know your last post was a couple of months ago but perhaps you never found a solution, so here it is.

    function my_remove_em_nav() {
    	global $bp;
    
    	bp_core_remove_subnav_item($bp->groups->slug,'group-events');
    	bp_core_remove_nav_item( 'events' );
    
    }
    add_action( 'bp_setup_nav', 'my_remove_em_nav' );
Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘remove Events menu from BuddyPress profile menus’ is closed to new replies.