Home / admin / Hide update nag within the admin
  • How to Hide update nag within the admin


    Adding this snippet to the functions.php of your wordpress theme will hide the update nag within the wordpress admin.

    ( click code to copy )

    wordpress snippet : PHP

    function remove_upgrade_nag() {
       echo '<style type="text/css">
               .update-nag {display: none}
    add_action('admin_head', 'remove_upgrade_nag');

    ( WordPress codex functions, hooks, in this snippet. )

    admin_head, add_action, _n,
  • keha76

    There is no need for non administrators to see the nag. Adding a check for permissions like below is in my opinion a good way to remove the nag but still show it for the administrator(s), or those who are allowed to perform updates.

    function remove_upgrade_nag() {
    if( !current_user_can(‘update_core’) ) {
    echo ‘
    .update-nag {display: none}
    add_action(‘admin_head’, ‘remove_upgrade_nag’);