Created
October 3, 2023 03:41
-
-
Save cameronjonesweb/c69ae4749f0c7f1ca5b6299ef16168b6 to your computer and use it in GitHub Desktop.
Wipe the WordPress admin dashboard and replace with your own custom template
This file contains hidden or 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 | |
add_action( | |
'all_admin_notices', | |
function() { | |
$screen = get_current_screen(); | |
if ( 'dashboard' === $screen->base ) { | |
/* Your code goes here */ | |
ob_start(); | |
} | |
}, | |
99999 | |
); | |
add_action( | |
'in_admin_footer', | |
function() { | |
$screen = get_current_screen(); | |
if ( 'dashboard' === $screen->base ) { | |
ob_end_clean(); | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment