I read in the forum that we can use this code to remove the Event Espresso News widget but it does not indicate where we need to place this at. I assume that I need to place this in my custom_functions file but how should I implement this?
Ideally this news is really only applicable to the site admins and not general subscribers.
The following function can be added to your themes functions.php or to a custom functions plugin
function remove_dashboard_widgets() {
global $wp_meta_boxes;
unset($wp_meta_boxes['dashboard']['normal']['core']['espresso_news_dashboard_widget']);
}
add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );
Perfect! Only I needed to swap the order of the code you presented to the following otherwise it broke site content altogther. I event used this to remove the example dashboard widget as well.
add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’ );
function remove_dashboard_widgets() {
global $wp_meta_boxes;
unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘espresso_news_dashboard_widget’]);
unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘example_dashboard_widget’]);
}
Viewing 2 reply threads
The support post ‘How to Remove Espresso News Widget’ 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.