0

I want to take the help button/link off fron the top right of the dashboard. I dont want to do it with a plug in so if you could tell me where the code is located and what to take off that would be great thanks.

1 Answer 1

1

The code is in wp-admin/includes/template.php, function screen_meta(). However, there's no hook to disable the help button, so if you want to get rid of the button, you'd have to use CSS or JS.

If you choose CSS, a

body.index-php .screen-meta #contextual-help-link-wrap { display: none; }

should do.

If you just want to get rid of the content, use the 'contextual_help' filter and return an empty string:

add_filter('contextual_help', 'my_dashboard_help', 10, 2);
function my_dashboard_help($help, $screen_id) {
    if ($screen_id == 'dashboard') $help = '';
    return $help;
}
5
  • Hi wyrfel, thanks for help, do you know what line number body.index-php .screen-meta is on, for love or money I can not see it in wp-admin/includes/template.php
    – user3612
    Commented Mar 1, 2011 at 14:37
  • The screen_meta() function is defined on lines 1675 - 1800 (in WP 3.1). The body.index.... line is an example of a stylesheet declaration you can use to hide the 'help' button, you won't find it in the code anywhere. (??)
    – wyrfel
    Commented Mar 1, 2011 at 18:38
  • The body.index line, where should I put that line, so it will hide the help button.
    – user3612
    Commented Mar 2, 2011 at 6:43
  • It's a stylesheet declaration, so it needs to go into a CSS file. If you don't hook one into the admin interface already, you may need to read up on how to do so. The Codex has documentation on that, and Google will help, too.
    – wyrfel
    Commented Mar 2, 2011 at 6:49
  • Thanks a million wyrfel. I know the very basics on wp and am looking to improve my knowledge so thanks for the information. I will look it up further.
    – user3612
    Commented Mar 2, 2011 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.