A more standard way to enqueue stylesheets in WP admin is to use wp_enqueue_style
function on admin_enqueue_scripts
hook.
if I do any changes afterwards it doesnt update
This sounds like a browser cache isssue. You can bust the cache by adding a dynamic version number parameter to the stylesheet url with the native php function filemtime
. It returns the unix time when the file was last changed. Like so,
// add to functions.php
function my_prefix_add_admin_styles() {
wp_enqueue_style( 'my_admin_styles', get_stylesheet_directory_uri() . '/wp-admin.css', false, filemtime( get_stylesheet_directory() . '/wp-admin.css' ) );
}
add_action( 'admin_enqueue_scripts', 'my_prefix_add_admin_styles' );
Related Posts:
- In the Admin Dashboard, can I choose which sections to display?
- Create custom page and custom menu
- Changing the Order of Admin Menu Sections?
- Remove unusable metaboxes in nav menu management screen
- Remove Pagination in Appearance -> Menus -> Categories
- How to add menu to Dashboard that can be viewed by all users
- Menu is invisible in admin panel but it’s visible in front-end [closed]
- Hide pages depending on role
- WP /wp-admin/admin-ajax.php produces 404
- Sort wp_nav_menu() by menu order
- Theme menu in Admin Panel
- show different admin menu to different user roles
- Navigation Menus Depth for specific menus
- Change search results order for Admin -> Appearance -> Menus -> Pages -> View all
- ‘Users’ and ‘Appearance’ have disappeared from dashboard menu [closed]
- Ad custom admin page like WordPress customizer [closed]
- How to remove menu installed in wp-admin by a theme? [closed]
- Custom Menu Broken WP 3.8.1 Update
- Use wp_logout_url() in menu creation page
- Limit User Iinterface for Admin?
- Is it possible to add a dynamic link in the main navigation in a child theme
- Rename menu items for All except super admin
- Admin top level menu, pointing to an external url
- how to remove description from menu buttons?
- In admin edit-menu screen, newly added menu items always go to the bottom of the list
- Menu page with three columns
- Additional navigation bar in header
- How to remove empty menu space when creating admin page without menu title using add_submenu_page
- Trying to add Newline in Menu item
- WordPress Dashboard add user password not working, etc
- How to work with a custom theme that someone else created before me? (details below)
- Is it possible to remove the highlighted menu on Users and highlight a different menu?
- Need Help Regarding Menu Magement in admin
- How do i make a custom top level dashboard menu item available for all users?
- how to configure this type of menu
- Menus not visible in Appearance after being registered
- How to separate sub-menu output and keep associated with parent
- wp_is_mobile() inside js
- change link of menu particular tab
- Customizing label/title output of admin nav_menu selecter
- List of WordPress menu item indices?
- How to handle change the appearance of ‘categories’ box on dashboard?
- Rename Menu icon in Twenty seventeen theme
- Critical Error when editing menu
- add_submenu_page add multilevel menu
- How to insert date in topNav
- wordpress 3.4.2 + wp_nav_menu + chunk theme not working [closed]
- How do I change the default wordpress navigation header that comes with my theme?
- Show posts of parent in edit.php
- Second tier sidebar navigation
- Change sub-menu css class
- How to get wordpress navigation to work
- How to add an tag when a menu item is a dropdown(or has a sub-menu) [duplicate]
- Auto Filled Custom Menus for Custom Post Types?
- Remove “Next Post” in nav_menu
- To Add Logout Button in Menu [duplicate]
- Add qtranslate language select box to menu [closed]
- wp_nav_menu doesn’t show on index page
- Setting up menus before making a template live
- Custom menus not showing
- Adding an additional menu in WordPress
- Adding Sub Menu In a theme which Do not have Menu Options
- ID of parent Menu
- wordpress superfish dropdown menu
- Add custom ID to wp_nav_menu list items
- Drop down menus css in custom menus
- Creating a custom menu
- How to set up suhosin.ini for unlimited menus
- Pick out specific menu item from code
- Show All Children of WordPress Menu
- Navigation list not correctly styled on pages with custom template (missing .current-menu-item)
- List WordPress Custom Menu’s active parent level’s children as separate menu
- Is there a limit to number of pages displayed for selection in custom menu?
- menu doesn’t show in different languages
- Make title bar collapse when scrolling
- Somehow lost my MENU from my home page- help!
- How to completely remove the top section with the menu?
- Launch wordpress site to local computer from live website backed-up
- Unable to edit Navigation bar
- Convert HTML code to WordPress menu
- Editor user only allow to post on certain categories
- Menu Underline shows without Hover after adding subitems
- how to show a custom taxonomy as dropdown in wordpress?
- Display Username as parent menu item
- My html data comes after the nav menu renders?
- How to modify menu text in callback function of ‘walker_nav_menu_start_el’ hook
- How to let the role “editor” to control the menu?
- How to view menu and submenus in URL
- How can I stop wp_nav_menu from returning extraneous root links?
- Add class to current category menu item
- Adding ‘Original’ URL for Custom links
- Problem to asign class to with wp_nav_menu()
- Permalinks linking to similar named site
- How to add posts with thumbnails to my dropdown menu?
- menu_class showing up on DIV instead of UL
- WordPress wp get nav menu items does not deliver external link
- deleted menu still present [closed]
- How do I show a different secondary navigation menu for each section of my website?
- Site with all content on the front page
- Adding Pages to Menus – No Page Hierarchy in Backend [duplicate]