You need to use wp_enqueue_style
and hook it into admin_print_styles
add_action( 'admin_print_styles' , 'my_wp_admin_css' );
function my_wp_admin_css() {
wp_enqueue_style('my_admin_style' , WP_PLUGIN_URL . '/myPlugin/stylesheet.css' );
}
If you just want the stylesheet on your plugins page you can use:
$mypage = add_management_page( 'myplugin', 'myplugin', 9, __FILE__, 'myplugin_admin_page' );
add_action( "admin_print_styles-$mypage", 'myplugin_admin_head' );
function myplugin_admin_head() {
// what your plugin needs in its <head>
}
Related Posts:
- adding custom stylesheet to wp-admin
- How to wrap admin menus and menu headers in additional divs without modifying the WordPress core?
- WordPress wp-admin suddenly lost its style
- How do you modify CSS files via admin panel?
- Activating Child Theme Breaks Website, Blank Page, Error 500
- Get Stylesheet To Showup in WP Admin Panel Editor
- Custom Background-Image not showing up
- Why are my frontend theme styles bleeding into the backend?
- In editor-style.css how can I change background color of title field?
- List All Enqueued Scripts and Styles
- How to apply a CSS file to my admin pages?
- Add styles to wordpress admin on the Page List
- WordPress Child theme fails to override parent theme css
- CSS of the admin panel
- Why does my edit screen suddenly have such a buggy interface?
- Admin area is not loading properly
- CSS not showing up in my website Only HTML Displaying
- Change height of Add New Post input box
- Removing Author name
- theme injecting css into wp-admin
- Where are the Parent themes CSS & PHP files hidden on WordPress?
- adding the category to the admin column for a custom post type?
- Change page title in admin area
- How to filter by post-format in admin?
- how do I force a single column layout in screen layout
- Make fonts.com font work in TinyMCE (iframe referrer issue)
- wp_list_table search box does not show
- How to remove the site health dashboard widget?
- Securing wp-admin folder – Purpose? Importance?
- How to Display Post Excerpts in Admin by Default?
- WordPress in sub directory wp-admin problem
- Admin account only shows Profile and Dashboard with no activity
- Opening specific posts on WP takes lot of time and freezes the editor
- Adding body class to login page?
- Edit a WordPress site without the username and password?
- How to load a CSS file into WordPress admin area using Child Theme? [closed]
- Getting “Cannot modify header information – headers already sent” error, but only on backend
- How can I remove the new stats message? [closed]
- Cookie value cannot be read until I’ve logged into the WP admin
- How to inhibit dashboard and profile management access to normal users?
- What corrections does this code need?
- Why can’t I exclude private posts from this query?
- Cannot Access Admin Area After Migration
- How to add wordpress blog to Windows 2008 R2 site
- Modify wp-admin page header ‘viewport’ meta data
- WordPress Admin Not Loading All Core Scripts
- The uploaded file exceeds!
- Admin table list API?
- Add column to pages table
- Use Password Protected Form without the use of wp-login.php
- redirect to a dedicated sign in page
- My email address is displaying an email which does not work. What do i do?
- Too many redirects after added SSL redirect on port 80 virtual host
- Register page in admin area
- Downgrade admin account by mistake
- Deploying WordPress for clients – what do they have access to?
- Removing Dashboard Menu Items Through The Database
- “WordPress installations is currently out of date” problem with difficult situation [closed]
- Custom plugin admin page issues
- Customising Word press Admin – Add Post Page functionality to another similar page
- How to add ‘Insert HTML Table’ button to TinyMCE in admin?
- How to allow WordPress updates to only one specific administrator?
- How can I remove commas when adding tags?
- Displaying Title in Title Tag on Edit page?
- How to add custom CSS and JavaScript file for wp- admin dashboard (backend)
- GoDaddy hosting wp-admin problem
- How can I remove unwanted word on my WP site?
- WordPress blog clone.. wp-admin issue
- How to take the help button and link off the dashboard
- issue with wordpress [wp-admin] redirects, when using kubernetes ingress hosting two wordpress websites using path
- Toggle between block ‘edit content’ and ‘select’ not properly working in WordPress Admin
- WordPress Admin extremely slow when other admin logged in
- Can’t acces login on new site
- WordPress Admin Panel Left Sidebar No showing on Post create page
- WordPress Migration Post Problems
- How to prevent spams from admin-ajax.php file?
- After changing Site http to https, can’t access wp login page with a digitalocean hosting
- Can’t access WP-Admin via HTTPS
- Strange wp-admin problem for all users/adminstrators except the original one?
- adding existing menu page on new customer user role
- stop customize.php redirect to login page if admin is not logged in
- Random authentication failures on a load balanced WP setup
- Can I get programmatic access to wp-admin?
- Strange URLs admin area bug
- remove_query_arg on options.php
- wp.svgPainter cannot init error, causing issues with admin panel
- mysql_escape_string PROBLEM
- Cannot access my wordpress website
- Organising and display thousands of photos in media library
- Custom comment action
- Get URL of current featured image with JS in edit post view
- get_current_screen – ‘Trying to get property of non-object’ error
- Block tools menu in wp-admin?
- is_admin() triggers error
- WordPress Admin: open popup window on a custom button
- not able to add thumbnail custom field in dropdown
- WordPress blog fails to open
- wordpress admin is broken [closed]
- Extend user search in the Wp backend area on the users.php page to allow for searching by email domain and role from the “users search” input box
- Cannot Access wp-admin