Support

Home Forums Event Espresso Premium How to Remove Espresso News Widget

How to Remove Espresso News Widget

Posted: August 27, 2014 at 9:59 pm

Viewing 2 reply threads


azitsm

August 27, 2014 at 9:59 pm

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.

unset($wp_meta_boxes['dashboard']['normal']['core' ['espresso_news_dashboard_widget']);


Dean

August 28, 2014 at 4:47 am

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


azitsm

August 28, 2014 at 1:55 pm

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.

Event Espresso