• 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://www.ads-software.com/plugins/events-manager/

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter yoluca

    (@yoluca)

    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)

    Thread Starter yoluca

    (@yoluca)

    I tried that alteady .. Doesnt work ..

    Thanks

    Hiya,

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

    Thanks

    Thread Starter yoluca

    (@yoluca)

    wp = 3.8.1
    bd = 1.9.2
    em = 5.5.2

    Thank you

    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.

    Thread Starter yoluca

    (@yoluca)

    `/* 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

    Thread Starter yoluca

    (@yoluca)

    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

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

    Thread Starter yoluca

    (@yoluca)

    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 );
    Thread Starter yoluca

    (@yoluca)

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

    thanks

    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.