Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Created July 1, 2016 13:43
Show Gist options
  • Save lorenzocaum/9a17969fc6e9ca73b666daac62cb4234 to your computer and use it in GitHub Desktop.
Save lorenzocaum/9a17969fc6e9ca73b666daac62cb4234 to your computer and use it in GitHub Desktop.
How to deactivate the Essential Grid plugin and the Social Warfare plugin in the event editor and venue editor for Event Espresso 4

Add the sample code below to your child theme's functions.php file or in a site specific plugin.

<?php
//* Do NOT include the opening php tag

//* Remove Essential Grid and Social Warfare meta boxes from event editor
add_action( 'add_meta_boxes_espresso_events', 'espresso_remove_admin_stuff_other_plugins_events' );

function espresso_remove_admin_stuff_other_plugins_events() {
    remove_meta_box( 'eg-meta-box', 'espresso_events', 'normal' );
    remove_meta_box( 'socialWarfare', 'espresso_events', 'normal' );
}

//* Remove Essential Grid and Social Warfare meta boxes from venue editor
add_action( 'add_meta_boxes_espresso_venues', 'espresso_remove_admin_stuff_other_plugins_venues' );

function espresso_remove_admin_stuff_other_plugins_venues() {
    remove_meta_box( 'eg-meta-box', 'espresso_venues', 'normal' );
    remove_meta_box( 'socialWarfare', 'espresso_venues', 'normal' );
}
@lorenzocaum
Copy link
Author

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment