Skip to content

Instantly share code, notes, and snippets.

@mrbobbybryant
Created January 4, 2015 20:40
Show Gist options
  • Save mrbobbybryant/3746a9fa5bf0e02d6363 to your computer and use it in GitHub Desktop.
Save mrbobbybryant/3746a9fa5bf0e02d6363 to your computer and use it in GitHub Desktop.
Removing Dashboard Widgets
<?php
function dwwp_remove_dashboard_widgets() {
remove_meta_box( 'dashboard_primary', 'dashboard', 'post_container_1' );
}
add_action( 'wp_dashboard_setup', 'dwwp_remove_dashboard_widgets' );
@dee2499
Copy link

dee2499 commented Jul 14, 2016

add_action( 'admin_init', 'dv_remove_dashboard_widget' ); works for me.

@jastuccio
Copy link

jastuccio commented Oct 13, 2016

I like to type the code first before watching the videos. The comments indicate there will be some info to correct this during the video. I will update this comment after watching if I remember.

@sambello247
Copy link

function dwwp_remove_dashboard_widget(){
// remove dashboard widget
remove_meta_box('dashboard_primary','dashboard','side');

}
add_action('wp_dashboard_setup','dwwp_remove_dashboard_widget');

This works for me.

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