• Resolved lazyazian

    (@lazyazian)


    Is there a way to only disable Events for Groups? I don’t want to disable events site-wide, but I do want to disable Events that are only for Groups.

    I’ve done a search and came across these 2 options that don’t work:

    1.) Inputting these 2 codes (separately and together) into my theme’s functions.php (I’m using Site5.com’s Wisebusiness theme)
    remove_action( ‘bp_init’, ‘bp_em_init’ );
    remove_action( ‘bp_include’, ‘bp_em_init’ );

    2.) into theme’s functions.php
    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’ );

    http://wordpress.org/extend/plugins/events-manager/

Viewing 5 replies - 1 through 5 (of 5 total)
  • try these

    function my_remove_em_nav() {
    global $bp;
    bp_core_remove_subnav_item($bp->groups->slug,'group-events');
    }
    add_action( 'bp_setup_nav', 'my_remove_em_nav' );

    agelonwl

    (@angelonwl)

    sorry, use these instead

    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' );

    Thread Starter lazyazian

    (@lazyazian)

    Thanks @agelonwl! That works perfectly!

    @agelonwl Thank you so much! This saved my day. I’m not a programmer but as far as I understand, this simply removes the navigation link in the BuddyPress Group pages? If I want to disable the part of Events Manager that handles BuddyPress groups/events I would have to use some other code, right?

    I found the thread below where the plugin creator answered but didn’t manage to get that code working. Does it need to be more than:

    remove_action( ‘bp_init’, ‘bp_em_init’ );

    See: http://wordpress.org/support/topic/plugin-events-manager-disable-events-on-buddypress

    Thanks!

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    @angslycke that should do it, that’s the entry point for loading BP stuff

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Events Manager] Disabling Groups' Events in Buddypress’ is closed to new replies.