Support

Home Forums Event Espresso Premium EE Metabox IDs

EE Metabox IDs

Posted: November 18, 2015 at 11:25 am

Viewing 2 reply threads


David Kong

November 18, 2015 at 11:25 am

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.

Thanks,
– David


Lorenzo Orlando Caum

  • Support Staff

November 18, 2015 at 11:49 am

Hi David,

Could you take a look at this example:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/admin/remove_EE4_meta_boxes.php


Lorenzo


Tony

  • Support Staff

November 18, 2015 at 11:57 am

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.

Event Espresso