Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tahirtaous/f7a3cb777904ba8741c2 to your computer and use it in GitHub Desktop.
Save tahirtaous/f7a3cb777904ba8741c2 to your computer and use it in GitHub Desktop.
hide screen Options and Help button from WordPress dashboard, useful when developing for clients
// hide screen options and Help Buttons from WordPress Dashboard
// tested WP 4.1 Jan 25 2015
// https://wordpress.org/support/topic/remove-items-from-screen-options
// paste this code to functions.php file
add_action( 'admin_head', 'remove_wordpress_cfields' );
function remove_wordpress_cfields() {
echo '<style>#screen-meta-links { display: none; }</style>';
}
@tahirtaous
Copy link
Author

// remove WordPress Version number Dashboard
// #footer-upgrade will remove Version number from dashboard footer
// https://wordpress.org/support/topic/remove-items-from-screen-options
// paste this code to functions.php file

add_action( 'admin_head', 'remove_wordpress_cfields' );
function remove_wordpress_cfields() {
echo '<style>#footer-upgrade { display: none; }</style>';
}

@tahirtaous
Copy link
Author

// hide about WordPress and sub menu drop down from WordPress Dashboard Top Left Corner
// https://wordpress.org/support/topic/remove-items-from-screen-options
// paste this code to functions.php file

add_action( 'admin_head', 'remove_wordpress_cfields' );
function remove_wordpress_cfields() {
echo '<style>#wpadminbar #wp-admin-bar-wp-logo>.ab-item { display: none; }</style>';
}

@tahirtaous
Copy link
Author

// hide screen options and Help Buttons, WordPress Version and About WordPress from WordPress Dashboard
// #footer-upgrade will remove Version number from dashboard footer
// #screen-meta-links will remove Screen Options and Help Buttons from dashboard footer
// #wpadminbar #wp-admin-bar-wp-logo>.ab-item will remove About WordPress from dashboard footer
// https://wordpress.org/support/topic/remove-items-from-screen-options
// paste this code to functions.php file

add_action( 'admin_head', 'remove_wordpress_cfields' );
function remove_wordpress_cfields() {
echo '<style>#screen-meta-links, #footer-upgrade, #wpadminbar #wp-admin-bar-wp-logo>.ab-item { display: none; }</style>';
}

@tahirtaous
Copy link
Author

// delete only screen options not Help button from Dashboard
// paste this code to functions.php file

function remove_screen_options(){
return false;
}
add_filter(screen_options_show_screen, remove_screen_options);

@drlogics
Copy link

drlogics commented Oct 8, 2018

// hide screen options and Help Buttons, WordPress Version and About WordPress from WordPress Dashboard
// #footer-upgrade will remove Version number from dashboard footer
// #screen-meta-links will remove Screen Options and Help Buttons from dashboard footer
// #wpadminbar #wp-admin-bar-wp-logo>.ab-item will remove About WordPress from dashboard footer
// https://wordpress.org/support/topic/remove-items-from-screen-options
// paste this code to functions.php file

add_action( 'admin_head', 'remove_wordpress_cfields' );
function remove_wordpress_cfields() {
echo '<style>#screen-meta-links, #footer-upgrade, #wpadminbar #wp-admin-bar-wp-logo>.ab-item { display: none; }</style>';
}

Thumbs up, tahirtaous! You'll be glad to know that the above code of yours was tested working today up to the latest Wordpress version 4.9.8. Hope you can modify this code for a specific Wordpress user sometime later. Thank you! Worked like a charm on my client's website. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment