If you have opened up your WordPress site up to user registrations, there are inevitably some things that you just don’t want them to see. Unfortunately, by default, there is no way to accomplish this directly from the options within WordPress. Until this day comes, you can remove dashboard items by adding some simple code to your functions.php file.
In my case, I have no need for my users to see:
- Right Now
- WordPress Development Blog
- Other WordPress News
To remove these, just add the following to your functions.php file in your theme.
[php]// ————————————————————————–// Start Remove Dashboard Items from Users
// ————————————————————————–
function remove_dashboard_widgets() {
global $wp_meta_boxes;
unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_right_now’]);
unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_primary’]);
unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_secondary’]);
}
if (!current_user_can(‘manage_options’)) {
add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’ );
}
// ————————————————————————–
// End Remove Dashboard Items from Users
// ————————————————————————–[/php]
Note: These functions are not of my own creation, simply things I have found along the way. If you are the author of this function, please let me know so I can properly credit you with your work!
Wow, thanx a lot for this tipp. I allready read an article elsewhere, where they descriped who to make a "pretty" login-link for WordPress but it didn't work. With your help it works now perfectly!
Dietmar