Remove Items from the WordPress Dashboard

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.

// --------------------------------------------------------------------------
// 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
// --------------------------------------------------------------------------

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!

About Joe D

I have always had a passion for everything computing. In early 2000, I decided to take my passion to the web. Thus, C.O.D. was born. Through the years we have made many great friends at C.O.D. and hope to continue our journey for years to come.

Check Also

Manage Multiple WordPress Sites with InfiniteWP

Running your website, or websites, on WordPress is an easy choice as the flexibility the …

One comment

  1. 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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.