• Resolved dubird

    (@dubird)


    So, is there a way to disable the message on the Theme Editor for CSS? This one “There’s no need to change your CSS here — you can edit and live preview CSS changes in the built-in CSS editor.”

    I understand why it’s there, but there’s no way to dismiss it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Maby just display: none for it ?

    Thread Starter dubird

    (@dubird)

    It’s not part of the CSS for the theme I’m working on, it’s part of the admin theme, I’d rather not mess around with that.

    I can’t attach an image, here’s the link to the screenshot of what I’m talking about.
    https://www.dubird.net/sigs/css_admin.jpg

    This worked for me. Add it to your theme’s functions.php file.

    
    add_action('admin_head', 'removeMessage');
    
    function removeMessage()
    {
        echo <<<EOF
    <style>
    #message
    {
        display: none;
    }
    </style>
    EOF;
    }
    
    Thread Starter dubird

    (@dubird)

    Awesome, thanks!

    Thread Starter dubird

    (@dubird)

    It does work for me too, thanks!.

    I could not get the code to work using EOF, but was successful with the following:

    //HIDE CSS Message
    function removeMessage() 
    {
    echo '<style>  #message  {  display: none; }  </style> ';
    }
    add_action('admin_head', 'removeMessage');
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove CSS warning on Theme Editor’ is closed to new replies.