Hiding wordpress message using CSS

I want to hide wordpress “please notify the site administrator” message from Dashboard.
enter image description here
The message is:

WordPress 3.5.1 is available! Please notify the site administrator.

HTML Code:

Read More
<div class="update-nag"><a href="http://codex.wordpress.org/Version_3.5.1">WordPress 3.5.1</a> is available! Please notify the site administrator.</div>

So, i have added a css like this to hide the message but the this is not working!
Here is the css:

.update-nag{
display: none;}

Any idea?

Related posts

Leave a Reply

7 comments

  1. Place the below code in your theme functions.php file.

    Just put this simple code in your functions.php and the update message will be hidden.

    function hideUpdateNag() {
        remove_action( 'admin_notices', 'update_nag', 3 );
    }
    add_action('admin_menu','hideUpdateNag');
    
  2. add_action(‘admin_menu’,’wphidenag’);
    2
    function wphidenag() {
    3
    remove_action( ‘admin_notices’, ‘update_nag’, 3 );
    4
    }

    Try this

  3. Just put this simple code in your functions.php and the update message will be hidden.

    function hideUpdateNag() {
        remove_action( 'admin_notices', 'update_nag', 3 );
    }
    add_action('admin_menu','hideUpdateNag');
    
  4. As the admin, I wanted to see the message, but I wanted it hidden for other users. I did this:

    function hideUpdateNag() {
        // if not an administrator
        if ( !current_user_can('update_core') ) {
            remove_action( 'admin_notices', 'update_nag', 3 );
        }
    
    }
    add_action('admin_menu','hideUpdateNag');