Created
September 20, 2018 17:48
-
-
Save corypina/9c7aa3741c1b7c9c825f05451d50fb09 to your computer and use it in GitHub Desktop.
Run custom CSS in WordPress admin screens
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 | |
/** | |
* Add CSS to Events Admin pages | |
*/ | |
add_action('admin_head', 'my_custom_fonts'); | |
function my_custom_fonts() { | |
// Get current screen if targeting post type is necessary | |
$screen = get_current_screen(); | |
if ( $screen->post_type == 'post_type' ) : | |
echo '<style> | |
selector { | |
property:value; | |
} | |
</style>'; | |
endif; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment