Created
June 6, 2016 19:47
-
-
Save jimi008/57fe6fc4d78d7854be96d8de31428eb1 to your computer and use it in GitHub Desktop.
Load a stylesheet or Scripts on specific admin pages
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 | |
function load_custom_wp_admin_style() { | |
$pageArr = array(1, 2, 3); | |
if(isset($_GET['post']) && in_array($_GET['post'], $pageArr)){ | |
wp_register_style( 'custom_wp_admin_css', get_template_directory_uri() . '/admin-style.css', false, '1.0.0' ); | |
wp_enqueue_style( 'custom_wp_admin_css' ); | |
} | |
} | |
add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment