Skip to content

Instantly share code, notes, and snippets.

@denishvachhani
Last active January 27, 2020 16:33
Show Gist options
  • Save denishvachhani/6103742 to your computer and use it in GitHub Desktop.
Save denishvachhani/6103742 to your computer and use it in GitHub Desktop.
Remove Dashboard Widgets in Wordpress Backend
<?php
add_action('wp_dashboard_setup', 'remove_dashboard_widgets');
if( !function_exists('remove_dashboard_widgets') ) :
/**
*
*/
function remove_dashboard_widgets() {
remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // Incoming Links
remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // Plugins
remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); // Quick Press
remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side'); // Recent Drafts
remove_meta_box('dashboard_primary', 'dashboard', 'side'); // WordPress blog
remove_meta_box('dashboard_secondary', 'dashboard', 'side'); // Other WordPress News
remove_meta_box('wpdm_dashboard_widget', 'dashboard', 'normal'); // Right Now
remove_meta_box('dashboard_custom_feed', 'dashboard', 'normal'); // Latest from ButlerBlog
remove_meta_box('tribe_dashboard_widget', 'dashboard', 'normal'); // News from Modern Tribe
remove_meta_box('social4i_admin_widget', 'dashboard', 'normal'); // News and Updates
}
endif;
?>
@alxjspalma
Copy link

alxjspalma commented Mar 6, 2018

Another way of removing Modern Tribe News is to add this line o code:
define('TRIBE_HIDE_UPSELL', true);
to the wp-config.php file, which is located at the root of the WordPress installation.
It it does not work promptly, try to change the position (up/down) in the code.
I don't know if there is a way to do this for the other widgets thought :)
Original post here:
https://theeventscalendar.com/support/forums/topic/remove-news-from-modern-tribe-from-dashboard/

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