As noted by @Fusion, this has changed beginning with version 5. In order to override admin styles for 5.*, you need a hook in functions.php
, something like this:
function custom_admin() {
$url = get_settings('siteurl');
$url = $url . '/wp-content/themes/my-theme/wp-admin.css';
echo '<link rel="stylesheet" type="text/css" href="' . $url . '" />';
}
add_action('admin_head', 'custom_admin')
Sources:
WordPress Codex
isitwp Snippet
Please note the the isitwp Snippet erroneously mixes html entitites with angle brackets. You should use angle brackets not entitieis.
Related Posts:
- Enqueue Javascript Correctly for 3.5
- Override Admin menu icon
- Setting $_SERVER[‘HTTPS’]=’on’ prevents access to wp-admin
- To close or not to close php
- How does printf( __( ) ); work?
- Return HTML Template Page with PHP Function
- Why do templates contain so many PHP tag pairs?
- Is there a way to parse shortcodes in PHP?
- Displaying a WooCommerce product via PHP
- How to add some custom HTML to the edit posts page
- What exactly does “Posts page” do in WordPress?
- Check if a menu is empty?
- JqueryUi Dialog giving Uncaught TypeError: this._addClass is not a function error
- Site Title and Tagline in Theme Options Page
- Static Frontpage Pagination – Custom loop
- Get the php template file from other theme folder
- WordPress Template Engine?
- Jquery no more loading, load-scripts.php not found (404)
- Admin Bar (Toolbar) not showing on custom PHP file that loads WordPress
- How to have a custom display for both woocommerce archive and product-category pages? [closed]
- Admin Media grid view images won’t load
- How to Join two tables from separate databases within WordPress
- Site Title and Tagline in Pagelines DMS Options Panel
- wp_remote_get returns an error for valid URL
- On this day PHP code
- How to loop over custom fields in a page template?
- Blank on static home page?
- WordPress theme & site not loading after moving files
- Adjust the results quantity for Search Results page pagination
- Exclude pages with certain template from wp_list_pages
- Use Timber/Twig to pull an image by image ID [closed]
- Categories Template Assistance
- Is it possible to use the featured image of a page as a css background without inlining?
- Unable to set right time in admin and frontend template
- Easiest way to show total number of subpages
- Sortable admin column for one meta key with three possible meta values
- Switching between custom templates in a post type of the admin menu
- Use template for posts with a particular category grandparent
- WordPress if (is_page) translation on certain page
- Performance issues with large website [closed]
- Blank space at beginning of tag?
- Placing the_content inside shortcode not working
- Link to file in plugin directory from wordpress template?
- Password protecting content in custom template
- List User order by ID in Descending order (Backend)
- JQuery not working on WordPress Admin page [closed]
- Add a Second Menu to a theme that only support 1 menu
- Custom excerpt function re-factoring
- Inject PHP code into “sidebar-content” – code before my WooCommerce sidebar widget?
- Admin username and password
- White Screen of Death – wp-admin
- How to display user nickname (not display name) in PHP template?
- Custom Template 404 for specific custom post type
- An unwanted inline style is added to my body tag
- How to properly insert a link to a template in WordPress?
- Custom field value not saving when it contains a URL?
- Automatically add custom CSS to new posts using a category template
- Can’t extend some core classes
- Render ninja form inside markup
- Retrieving Author ID in wp-admin area
- How can I load a PHP page without using a Template?
- How to create a form and display its content as table in admin panel?
- how could I load a different template part by page
- creating a second image attachment template?
- Namespace spl_autoload problem in WordPress admin
- Mass update excerpt
- Unreadable pagination
- remove wp floating submenu in wp dashboard
- How can I get a single php file that is the equivalent of an existing WordPress page?
- My custom wp-admin php files stopped working
- Get and insert order email address to the PHP template inside HTML text
- Custom search results page not working with empty search
- Call to undefined function wp() in wp-blog-header.php
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- How to show single category archive
- Cannot access wp-admin (wordpress dashboard)
- Cannot access wp-admin/wp-login.php (WordPress backend) anymore, what could be wrong?
- Remove metabox from WordPress menu editor page?
- code is skipping a div
- Issues getting PHP to display in category pages
- How to make my custom widget appear within WordPress widgets? Plugin development
- Change title only in dynamic page
- PHP version problem?
- Secondary navigation menu on one page
- Enable custom logo upload if logo is not in header
- Programmatically create page when saving custom post type post
- WordPress admin is incredibly slow [closed]
- inserting a post from an extern php file but post content doesn’t show on wp site
- How can I edit the content in index.php? [duplicate]
- Jquery function working in Dev Console but not otherwise [duplicate]
- Woocommerce Show Single Product on Homepage
- How to change menu labels
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- how to show only specific category for a template
- Show a different code on front page to other pages
- Does wordpress templates always in files or in database?
- Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’) [closed]
- Using same variable names in files added with get_template_part()
- WordPress admin-ajax.php
- PHP include is only working in certain places in my custom WP theme