Created
December 7, 2023 15:40
-
-
Save corypratt/b8cd66c964518d912b5cb5ebab408555 to your computer and use it in GitHub Desktop.
WordPress - Remove Recent Comments Box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disable the Recent Comments Widget from the WordPress Admin dashboard. | |
*/ | |
function remove_dashboard_widgets() { | |
global $wp_meta_boxes; | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] ); | |
} | |
add_action( 'wp_dashboard_setup', 'remove_dashboard_widgets' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment