• I’m trying to select a few individual colors for some menu items in the Admin menu
    In functions.php of child theme I have

    function railtrail_enqueue_custom_admin_style() {
            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', 'railtrail_enqueue_custom_admin_style' );
    
    .menu-icon-settings .wp-menu-name {
        background-color: #006ba1;
    }
    
    .menu-icon-tools .wp-menu-name {
        background-color: #006ba1;  
    }
    
    .menu-icon-users .wp-menu-name {
        background-color: #006ba1;   
    }
    
    .menu-icon-plugins .wp-menu-name {
        background-color: #006ba1;  
    }
    
    .menu-icon-appearance .wp-menu-name {
        background-color: #006ba1;  
    }
    
    .menu-icon-comments .wp-menu-name {
        background-color: #006ba1; 
    }

    This is not working, any pointers would be great

    • This topic was modified 1 year, 11 months ago by Marklcm.
    • This topic was modified 1 year, 11 months ago by Marklcm.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Your code works for me: the background color is applied to the specified dashboard menu items.

    Two things to check:

    1) That the admin-style.css file at the root of the active theme’s folder
    2) That your browser is not showing an older, cached version of the file

    Thread Starter Marklcm

    (@marklcm)

    Thank you for your reply and the work you do in the forums.
    Yes, I’ve double checked and flushed caches etc.
    It is very frustrating.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘admin menu, custom colors’ is closed to new replies.