I tried the following:
<?php
function my_wp_admin_css() {
echo '<link rel="stylesheet" href="/wp-content/plugins/custom-admin-style/wp-admin.css" type="text/css" />';
}
add_action('wp_admin_css','my_wp_admin_css');
but nothing is being displayed in the WordPress admin.
What I’m doing wrong?
You need to use
wp_enqueue_style
and hook it intoadmin_print_styles
If you just want the stylesheet on your plugins page you can use: