I’m trying to remove some EE metaboxes from the “Add New Event” page, but it isn’t working. I’m either guessing the IDs incorrectly, or else my call is happening before EE adds its metaboxes. I’m guessing it’s the former. Do you have a list of the EE metabox IDs? All of my calls to remove WP metaboxes work, but the ones to remove EE metaboxes don’t.
Here’s an example:
function remove_ee_metaboxes(){
if ( ! current_user_can( ‘delete_others_pages’ ) ) {
remove_meta_box( ‘slugdiv’, ‘espresso_events’, ‘normal’ ); // works
remove_meta_box(‘espresso_events_Messages_Hooks_Extend_messages_metabox_metabox’, ‘espresso_events’, ‘normal’ ); // doesn’t work
}
}
add_action( ‘do_meta_boxes’, ‘remove_ee_metaboxes’ );
I’d like to remove the Notifications, Questions for Primary Registrant, and Questions for Additional Registrants boxes.
Also please take note of the comments at the start of that function, removing meta boxes that EE is expected to receive data from my have unexpected results.
Double check all changes on a development copy of the site to confirm they do actually work as expected 🙂
Viewing 2 reply threads
The support post ‘EE Metabox IDs’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.