How to Customize the WordPress Admin Area

Sep 23 2010 by Filip Stefansson | 132 Comments

WordPress is one of the best CMSs out there — if not the best (but of course, I’m biased because I’m a WordPress fanatic). It has loads of handy features that make site administration a breeze. WordPress is a publishing platform with a comment system, a GUI for creating, editing and managing posts and pages, handy built-in tools like the "Export" feature to back up your content, user roles and permissions, and more.

But how much of these features do we really use? Though already simple and user-friendly by default, we might want to customize the WordPress Admin interface to make it even simpler and more manageable for our clients, our co-authors, and ourselves.

Why Customize the WordPress Admin Interface?

Lately, WordPress has reached phenomenally high usage rates. There are over 25 million publishers[1] who use WordPress, making it a popular publishing platform. This means that its use has been extended outside of just a blogging platform (although it was certainly built for bloggers at the start) to other types of sites such as portfolios, business sites, image galleries, and even e-commerce sites.

Here is the problem, though. A robust publishing platform like WordPress has way more features than a regular user would ever need. Take the "Comments" panel for instance: Not everyone is going to need all the moderation privileges it has. Some sites might not even need commenting capabilities on their content. For example, a static informational site that doesn’t have a blog section might not want people to be able to comment on static pages like their About and Contact Us page.

The following image shows the default WordPress Dashboard — the first page you’ll see when you log into the Admin area. For tech-savvy folks and power users, it’s great. But imagine a person (such as a paying client of yours) who doesn’t need half of the things they see in this screen. All they want to do is publish a post. Maybe edit it if they make a mistake. That’s it. Nothing else.

The Solution

Luckily, WordPress has a solution. A good one. A completely modular and reversible one, in case you want to quickly revert back to the way things were.

The solution is called Hooks, also known as "Filters" and "Actions". These guys allow us to "hook" into the WordPress core without modifying its files so that we can safely make changes without compromising the integrity of our installation.

We are going to use WordPress’s different actions and some of the available filters to remove features we do not need. We will also make some basic customization changes to brand our WordPress Admin area for our clients.

The snippets we will be using are mostly from my site, WP Snippets, a searchable repository of WordPress snippets (check it out when you have the time).

WordPress’s functions.php

Let’s get started. The first thing you need to do is open up functions.php in your theme’s directory. If you don’t have a functions.php file, then just create one using your favorite text editor.

functions.php is the file where we will put all our code in. WordPress automatically checks this file, allowing you to customize just about everything before it’s rendered on the screen.

Sounds fuzzy? Here’s how it works. Try out the following code. Don’t worry; it will only affect the Admin area — so your site visitors won’t see it. However, I do want to advise you to experiment offline by installing WordPress on your computer (it’s easier than you think).

<php
function testing() {
  echo 'Hello World!';
}

add_action( 'admin_head', 'testing' ); 
?>

Explanation

The code should print ‘Hello World!’ inside the <head> tags in the Admin panel, which isn’t valid HTML code and therefore is printed out at the top of the web page.

The testing() function is our code that we want to run. To hook into WordPress core, we use the add_action() function. In this situation, we pass in two parameters. The first parameter is the name of the action you want to hook into ('admin_head'). The second parameter is the name of the function you want to run ('testing').

After you try this code snippet out, be sure to remove this code from your functions.php file (we’re done with it).

Disable Dashboard Widgets

The first thing people will see when logging into the Admin area is the Dashboard. There, you’ll find widgets like "WordPress Blog," "Other WordPress News," and "Incoming Links". Not very interesting for the average user.

We will be using the wp_dashboard_setup action to remove them. In the function we want to execute, we will use the unset() function to remove the Dashboard widgets we don’t want to display. Then all we need to do is call add_action() using 'wp_dashboard_setup' as the first parameter as well as our function, named remove_dashboard_widgets, as the second parameter.

function remove_dashboard_widgets(){
  global$wp_meta_boxes;
  unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
  unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
  unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
  unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
  unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
  unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); 
}

add_action('wp_dashboard_setup', 'remove_dashboard_widgets');

Check out the WordPress docs entry on removing dashboard widgets for more information.

Disable Standard Widgets

WordPress comes with 12 standard widgets. Some of these default widgets include Calender (WP_Widget_Calendar), Search (WP_Widget_Search) and Recent Comments (WP_Widget_Recent_Comments).

You might want to disable the widgets that aren’t needed for your WordPress installation, again, to simplify and declutter your publishing platform. For example, you might not need the calendar, or maybe you’ve used a third-party search service such as Google Custom Search for your client’s WordPress installation.

For this one, we will be using widgets_init action. We will name our function simply as remove_some_wp_widgets. In our function, we will use WordPress’s unregister_widget() function using the names of the widgets we don’t want to use as the parameter.

Then, like before, we just call add_action. What you’ll see in this code snippet is a third parameter ('1'). The third parameter is the priority of the action. 10 is the default priority, meaning that if you don’t pass a value for this optional parameter, it will assume the value is 10. The lower the number, the higher the priority. So at 1, this is one of the top priority functions that will be called first no matter what its position is in functions.php.

function remove_some_wp_widgets(){
  unregister_widget('WP_Widget_Calendar');
  unregister_widget('WP_Widget_Search');
  unregister_widget('WP_Widget_Recent_Comments');
}

add_action('widgets_init',remove_some_wp_widgets', 1);

Learn more about the Widgets API to see other cool stuff you can do with it.

Removing Menu Items

You might want to remove menu items in the Admin panel to simplify the interface.

This is how you disable top-level menu items such as "Posts," "Media," "Appearance," and "Tools":

function remove_menu_items() {
  global $menu;
  $restricted = array(__('Links'), __('Comments'), __('Media'),
  __('Plugins'), __('Tools'), __('Users'));
  end ($menu);
  while (prev($menu)){
    $value = explode(' ',$menu[key($menu)][0]);
    if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){
      unset($menu[key($menu)]);}
    }
  }

add_action('admin_menu', 'remove_menu_items');

This is how you would remove submenu items under the top-level navigation (for example, the "Theme" link under "Appearance"):

function remove_submenus() {
  global $submenu;
  unset($submenu['index.php'][10]); // Removes 'Updates'.
  unset($submenu['themes.php'][5]); // Removes 'Themes'.
  unset($submenu['options-general.php'][15]); // Removes 'Writing'.
  unset($submenu['options-general.php'][25]); // Removes 'Discussion'.
  unset($submenu['edit.php'][16]); // Removes 'Tags'.  
}

add_action('admin_menu', 'remove_submenus');

To find what the submenu names are, just go to wp-admin/menu.php and search for the item you want to disable.

Remove the Editor Submenu Item

The Editor link (a submenu item under "Appearance") is a bit tricky to disable. It doesn’t respond to the unset() function used above. Thus, if we wanted to remove it from the menu, we’d have to remove the action that displays it.

We will use the remove_action() function which simply removes the action from our theme.

function remove_editor_menu() {
  remove_action('admin_menu', '_add_themes_utility_last', 101);
}

add_action('_admin_menu', 'remove_editor_menu', 1);

Disable Meta Boxes in the Editing Pages

The "Add New" and "Edit" pages — the GUI for creating and editing posts and pages — is probably the most used feature in the Admin area. This is what you and/or your clients will be most exposed to. It serves us well if we try to clean these pages up by removing things that we do not need.

For example, do you use any Custom fields or do you use the Excerpts field? If not, just remove them from this view.

The following code snippet uses the remove_meta_box() function. The first parameter is the meta box’s HTML ID attribute you want to remove.

To find out the ID, just inspect the source code or use a tool like the Web Developer Toolbar to determine the ID attribute value of the section’s containing <div>. For example, the Custom Fields’ ID is #postcustom, so the parameter we use is 'postcustom'.

The second parameter refers to the page you want to remove the meta box from (it can be either 'post', 'page', or 'link').

We are going to remove the custom field, Trackbacks checkbox (because most of the time, we either enable or disable it in all of our posts), the comments status option, tags (if you don’t tag your posts with keywords, why have this input field?), and so on.

function customize_meta_boxes() {
  /* Removes meta boxes from Posts */
  remove_meta_box('postcustom','post','normal');
  remove_meta_box('trackbacksdiv','post','normal');
  remove_meta_box('commentstatusdiv','post','normal');
  remove_meta_box('commentsdiv','post','normal');
  remove_meta_box('tagsdiv-post_tag','post','normal');
  remove_meta_box('postexcerpt','post','normal');
  /* Removes meta boxes from pages */
  remove_meta_box('postcustom','page','normal');
  remove_meta_box('trackbacksdiv','page','normal');
  remove_meta_box('commentstatusdiv','page','normal');
  remove_meta_box('commentsdiv','page','normal');  
}

add_action('admin_init','customize_meta_boxes');

Remove Items from the Post and Page Columns

WordPress’s Admin area often has tables that give you a quick overview of a listing of your content. If you wanted to remove columns from these views, you can.

This time, we will use the add_filter() WordPress function to add a filter instead of an action. A filter is simply a function that watches out for data being called from the database. When it sees something that we want to remove (or modify), it executes the filter first before rendering the data on the web page.

In the example below, we will remove the comments count from the Edit Pages and Edit Posts pages.

function custom_post_columns($defaults) {
  unset($defaults['comments']);
  return $defaults;
}

add_filter('manage_posts_columns', 'custom_post_columns');

function custom_pages_columns($defaults) {
  unset($defaults['comments']);
  return $defaults;
}

add_filter('manage_pages_columns', 'custom_pages_columns');

Customize the Favorites Dropdown

Sitting at the top bar of the Admin area is a dropdown called "favorites" that just lists commonly used Admin tasks such as "New Post," "Comments" (which takes you to the comment moderation page), and so on — for easy access.

If we wanted to remove items in this menu, we can easily do so. (Of course, we can also add stuff here too.) We can do this by adding another filter and unsetting the link, which is contained in a PHP array called $actions.

function custom_favorite_actions($actions) {
  unset($actions['edit-comments.php']);
  return $actions;
}

add_filter('favorite_actions', 'custom_favorite_actions');

The Final Stretch: Miscellaneous Modifications

Everything we have done so far is to disable stuff we don’t need. Now we’ll modify a few things.

Customize the Footer

The footer text in WordPress Admin contains links to the Documentation and to WordPress. Let’s change that.

This snippet just prints out some footer text.

function modify_footer_admin () {
  echo 'Created by <a href="http://example.com">Filip</a>.';
  echo 'Powered by<a href="http://WordPress.org">WordPress</a>.';
}

add_filter('admin_footer_text', 'modify_footer_admin');

Change the Logo

This one’s an old trick, but a good one nonetheless. You can change the logo for the login page and the one in the top left located at the WordPress Admin area pages.

The subsequent code snippet just prints out the CSS (that will be printed inside the <head> tags of Admin pages) that hooks into the div of the logo; it has an ID of #header-logo in the admin pages and it is the h1 > a element for the login page.

For the url property of the style rules, we just feed it the image location of our logo. If the image is inside your WordPress theme’s directory, you can simply use the get_bloginfo('template_directory') template tag to get the relative path to it, followed by the location of the images directory (in this case, it’s called "images") and then the file name of your image (in this case, admin_logo.png and login_logo.png).

function custom_logo() {
  echo '<style type="text/css">
    #header-logo { background-image: url('.get_bloginfo('template_directory').'/images/admin_logo.png) !important; }
    </style>';
}

add_action('admin_head', 'custom_logo');

function custom_login_logo() {
  echo '<style type="text/css">
    h1 a { background-image:url('.get_bloginfo('template_directory').'/images/login_logo.png) !important; }
    </style>';
}

add_action('login_head', 'custom_login_logo');

Hide the Upgrade Notice to Recent Versions

There’s no guarantee that your theme will support the next version of WordPress, so to prevent your clients from updating their website, you can ask WordPress to hide this notification.

First, I have to say that this isn’t advisable. WordPress core developers put this notification there for a huge reason: Security updates. But if you must remove it (or modify it), all you have to do is to add a filter for it.

add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );

Customize the WYSIWYG Editor’s CSS

If you wanted to customize the appearance of the WYSIWYG editor (maybe to match the theme of your site), you can create a custom stylesheet for it (you can call it something like editor-style.css) and then study the HTML markup to see how you can hook into the classes and IDs of the editor. Then to add your custom stylesheet, you can use the add_editor_style() function.

add_editor_style('css/editor-style.css');

The reason why you’d want to do this instead of modifying the global.css stylesheet that comes with WordPress is ease of updating the core and modularity. If there’s one major theme to take away in this guide, it’s that you should never modify WordPress core files — there are plenty of ways to hook into them.

The Outcome

Using these snippets of code, you can customize and reduce the Admin area’s features down to just the essentials, permitting us to benefit from the advantages of minimalism and reductionism principles in our work.

This is what I’ve been doing, and my clients love that all the clutter that they don’t need isn’t there.

Here’s a final image of my result (for the "Add New Post" page):

Your Turn

Now it’s your turn to talk. Do you customize WordPress in any way for your customers, and if so, how? The depth of WordPress is incredible, and I would love to see more tips and tricks about how to make it even simpler — share your tips and tricks in the comments.

References

  1. Stats. en.wordpress.com.

Related Content

About the Author

Filip Stefansson is a Swedish developer. He’s the founder of WP-Snippets and co-founder of Pixby. You can connect with Filip on Twitter.

132 Comments

Jonay Pelluz

September 23rd, 2010

Thanks for the post, great one! I will definely customize the dashboard to make it quicker and more accessible when I write from work. :-)

Alex

September 23rd, 2010

Excellent post, seems like I can create a default functions.php file for clients when I start a new theme to save them getting overwhelmed.

I’d love to see WordPress become more modular in the future, so you can choose whether to add core features like comments or not when you install it.

Matt

September 23rd, 2010

Hi Filip,

that’s some great advice. Thank you.
Maybe you could and should explain, how to do those changes only for certain user roles. If you build a site using wordpress as cms you might want to give your clients editor or author rights, not admin rights. So, how would you hide the unnecessary menus and things just for these roles?

Cheers,
Matt

Frank

September 23rd, 2010

Many features of your great post is include the plugin Adminimize, for readers, she will not write code.

Michael Hamann

September 23rd, 2010

Hello !
very nice …Thank you.

Blindmono

September 23rd, 2010

Maybe you will find the WPLite plugin useful: http://wordpress.org/extend/plugins/wplite/
It provides an easy interface for hiding options of your sidebar menu.

Daniel Developer

September 23rd, 2010

Good job Filip,

I`m using the plugin Imaster WP Hacks, and her make it all. Try use it: http://wordpress.org/extend/plugins/imasters-wp-hacks/

Connor Crosby

September 23rd, 2010

Excellent blog post. I have been wondering how to customize it. Thanks!

Web Design Kent

September 23rd, 2010

Great tips, interesting to know… thanks!

David

September 23rd, 2010

Very nice tutorial Filip !

dan

September 23rd, 2010

haha good stuff, this is exactly the information the i need for my next project, cheers

Syed Balkhi

September 23rd, 2010

This is indeed a very neat post. We do this often for our clients when we are creating a custom backend panel to cut clutter and increase usability.

If someone is just trying to kill clutter, they can merely just bring the screen tab down and unselect all options… But again the technique shared in this post is for advanced users who are most likely doing this for clients.

Another great post on Six Revisions.

Steven Rossi

September 23rd, 2010

Thanks for this post. It was really helpful to have all of this info in one place. My clients will thank you, heh.

Bradley

September 23rd, 2010

This is great. Most of my clients are so intimidated by the WordPress backend they never go in and edit anything themselves.

Realistically, if I could cut down on the stuff in the admin section to just page and post editing/creation functions, most of my clients would be super happy. They could care less about all the other stuff.

Mo

September 23rd, 2010

while tis is a useful tip, most of the items can be hidden by using the “screen options” menu on the top right.

Jeff Archibald

September 23rd, 2010

Hugely helpful article, Filip. Well written and great for those of us who us WP as a CMS. I’ve written before over on our blog about using plugins/tips to make WP a better CMS, but hardcoding is definitely the way to go. Bookmarked.

allen

September 23rd, 2010

Great article on WordPress customization of the admin! Bookmarked for future reference.

JAWEL_

September 23rd, 2010

Thanx for the post. Always good to know how to keep the client from crashing what could have been a nice designed website.

DavidM

September 23rd, 2010

Great article – deserves it’s Delicious listing today.

Doing a lot of WordPress CMS work at the moment so this is all stuff I can use right now!

Thanks a million – off to check out WP Snippets now :-)

Jerry

September 23rd, 2010

Nice article.

There is also the WordPress whitelabel CMS plugin that allows for this type of customization.

In case you don’t want to mess with any code. ;)

Marco

September 23rd, 2010

wow, this is really nice… i’m a joomla user just getting started with WordPress and so far i’m lovin’ it. This was one of the things i was wondering if i could make changes on admin and here it is =)

thanks guys

Metin

September 23rd, 2010

Thanks for the clean, yet comprehensive, guide.
Thumbs up!

Ross

September 23rd, 2010

What if I just want to rename the title field on the post/page screen?

I have a testimonials custom post type that uses just the title and content inputs. The title is used for a name of the testimonial writer. I can just add a new meat box for testimonial author and hide the title input, but then the listing of testimonials shows a blank title for the post. It seems like an easier solution to simply use the existing title field for the writer’s name, but the label “Title” is confusing.

Andrew Gould

September 23rd, 2010

I’ve been thinking about doing this, for when I have more writers. I’m not positive of how I’m going to do this though. Thanks for the ideas, I also love WordPress oh so much!

anmari

September 23rd, 2010

Hi Filip,
Nicely presented article. Personally I prefer the approach of not permanently disabling the boxes, columns, etc.

Also if you have different levels of users, it can become tricky.

What I wanted was that new users when they login would have the simplest possible interface for their role level.
As they become more sophisticated (comfortable with the system), they may want to add some features back in – eg: the featured image box once they are comfortable loading images.

Of course the screen options allow one to do this, but one does NOT want to have to logon for ALL your users and clean it up for them before they login.

SOoooo “there’s an app for that”…. yes I wrote a plugin that allows one to have a ‘template’ user for each role in your system. (Could be the same say admin user for all roles say). One logs on once for the template user and sets up the interface the way you want.) then any new users (and yes you can retroactively update existing) automatically get the cleaned up settings,

Since they are not permanently disabled, each user could once they know more, then go to screen options and add back boxes and columns to get more functionality when they need it.

See http://webdesign.anmari.com/plugins/amr-user-templates/
There is also a disposable test site where you can register and see for yourself a simplified interface.

shawn mcconnell

September 23rd, 2010

This is very useful if your like me and using WP as your cms for clients, this will save some head aches from over zelous client who like to “explore” and change settings, great post!

John Adigue

September 23rd, 2010

Wow! Great Article Filip. I will save all these snippets. Thank you.

agungshiro

September 23rd, 2010

nice post … this is one of article that i have search for a long time

cynthia Jeffcoat

September 24th, 2010

this article helped alot. Thanks for sharing your insight

Tony

September 24th, 2010

Great post! I wrote the same post awhile back, but with different tips on how to customize things: http://loneplacebo.com/how-to-customize-wordpress-admin-area/

Idraki M.

September 24th, 2010

Although this could be achieve using some WP plugin, but I must say this is a good article Filip. Good job

fhai

September 24th, 2010

Finally, an issue that I am passionate about. I have looked for information of this caliber for the last several hours. Your site is greatly appreciated.

Jacob Gube

September 24th, 2010

Just to quickly comment regarding the ability to disable some stuff using the WordPress Admin. Personally, what I found most valuable here is the discussion on working with hooks and function.php for customizing your WordPress installation. Filip covered the Widgets API, Hooks API, and all sorts of goodies. Perhaps it might inspire you to write plugins or your own theme framework like WooThemes or Thesis for your client work or for selling your own premium themes.

See on Six Revisions, the philosophy is first that the tutorials must be pragmatic and hands-on so that you can finish a tutorial and be able to do *something*. Useful and informative — that’s the goal.

But more than that, those that read between the lines will realize it’s more than just building an accessible jQuery slideshow or hiding stuff in the WordPress panel, but an exploration of best practices in web development, or in this case, an exploration of advanced WordPress APIs, coding for modularity, and using functions.php.

Thanks and wonderful tutorial Filip.

Tixy

September 24th, 2010

Good article! Personally, WP, has more features than I need and I’m pretty confused when I use it. I will try to follow these advices and customize it to meet my needs.Thanks!

Filip

September 24th, 2010

Thank you everybody. I’m looking forward to write more on WordPress here at Sixrevisions, if Jacob let me!

Gina

September 24th, 2010

Hello. A much useful article. Thanks for sharing.

Yoosuf

September 24th, 2010

awesome tips, i was seriously searching for the menu hiding part and finally found over hear.

werew

September 24th, 2010

Deb. why use white dashboard? It’s not usefully

Jacob Gube

September 24th, 2010

@Filip: I hope I’m speaking for the SR community in saying that we’re looking forward to more of your guides and articles here as well!

Caleb McGuire

September 24th, 2010

I love this. I’ve installed WP on so many client websites, and I always feel like I have to apologize for the extra unused panels. This just might be easy enough to be cost effective. I think I have about 3 or 4 different custom admin that I would template, so it wouldn’t be too much overhead to get this in action on a lot of my sites.

Thanks

Victor

September 24th, 2010

Feels good man! :)

Ryan

September 24th, 2010

Very useful tutorial! Thanks for taking your time to write this one up.

Jennifer R

September 24th, 2010

Nice tutorial, I could remove unwanted widget showed in WordPress admin panel with this way.

huarong

September 25th, 2010

I am using wordpress too.
I will try it this afternoon.

Gabriele Maidecchi

September 25th, 2010

Nice tips, I wasn’t aware of most of them so they are very welcome! :)

Mike Key

September 26th, 2010

Great article. This has really helped me take it up a notch with branding and simplifying the WordPress Admin experience.

There really is a serious lack of info on how to brand the Admin section of WordPress and this is really useful for WordPress Developers, more articles like this would be great.

Huw Rowlands

September 26th, 2010

Love the tips…
One issue: I wanted to remove some panels from a custom post type… But the above examples don’t work.

How can I do this?

Margie Mintz

September 26th, 2010

Just what I was looking for! Very helpful.
Thanks!

anmari

September 27th, 2010

Huw, (or anyone who does not want/struggling to code it themselves). The user templates plugin mentioned further up in the comments also works on custom post types)

anmari

September 27th, 2010

Filip – just went to look at http://wp-snippets.com/ and it is doing something really strange – foreign characters all over screen.

Chris

September 27th, 2010

Great tips, interesting to know… thanks!

Jacob Gube

September 27th, 2010

@anmari: Thanks for the suggestion. Anyways, I took a look at Filip’s site, and it looks OK to me (Vista, Google Chrome 6.0). I think it would help Filip out if you could post a feedback so that it can be recorded on his site.

Jonathon

September 27th, 2010

Great post and advice, thanks for this!

Sitebase

September 27th, 2010

Very usefull for cleaning up the wordpress backend so it’s easier to use for clients.
Thanks.

AlejoBergmann

September 27th, 2010

Great tips, really useful tutorial!

anmari

September 27th, 2010

Hi Jacob,
It looks fine now.
It was really weird – At the time I looked at in FF and IE and refreshed a few times. Also did view source.
It looked like an encoding problem maybe – square boxes etc amongst all the strange chars – complete garbage, nothing recognisable.
I have never seen anything like it and would like to know what it was for preventative reasons!

Kevin

September 28th, 2010

Thanks Jacob. I’m using WordPress for my blog and your tutorial is awesome and very useful. Cheers

Filip

September 28th, 2010

@anmari: I installed the Super Cache Plugin, and had “compress pages” activated. My hosting service didn’t support that.

Frederik

September 29th, 2010

Great Post! I’ll certainly make use of this..

Jason

September 29th, 2010

Very nice article. A lot of what you mention i already have hobbled together and use, but it is great to see i am not the only one. I also use the excellent Adminimize plugin to quickly remove elements and tailor the interface for individual clients.

I must say the stand out for me in this article is the unregister_widget() function. It is new to me and is now part of the arsenal.

Although i love WordPress as a package, when a site is built for someone that does not want any bells or whistles, most of this article is invaluable.

Very Good job!

Avangelist

October 1st, 2010

Yeeeeeeah, nice to strip out functionality based on user type – which is already available without really extending the core.

It doesn’t detract from WordPress’s continued lack of interface development for admin. You still only have 1 title and 1 content box, unlike say Drupal where you can build admin interfaces for particular tasks.

It is a very concise list of options available in hooks as shown in the demonstrations on wordpress.org

Adam Hermsdorfer

October 2nd, 2010

For the newbies, here are some plugins that accomplish the same thing: adminimize and custom admin branding. Adminimize really cleans up the dashboard, and helps make it more “client proof”.

Carl

October 6th, 2010

Great post Filip! Thanks!

Gangesh

October 8th, 2010

Thank you ! :)

Richard van den Winkel

October 12th, 2010

Very good post! Thanks!

Dasha

October 12th, 2010

Thanks Filip, amazing article – learned a lot!

Joining @Matt on his question, is it possible to hide admin features for some users, but not the others?

Also, a bit more general question. I’ve noticed in the comments that people say there are plugins that hide some admin features. I was wondering what’s better: plugins or DIY??

Thanks!

Lisa

October 20th, 2010

This is just what I was looking for. Great, useful information. Thank you for making something that seemed difficult, make sense.

Charles Barachina

October 30th, 2010

any tutorial for using full-seo-pack in WordPress..?
thanks…

OBrian

November 3rd, 2010

Great article. Now I’m definitely going to put an effort for admin customizing. Thanks!

Michael

November 3rd, 2010

Hej Filip,

Jeg har problemer med at flytte de forskellige elementer i post arealet.

Hver gang jeg flytter et element til den ønskede position, rykker den tilbage når jeg opdaterer. :(

Det har ikke noget med mine plugins at gøre – det hat jeg prøvet….

Har du et forslag?

Dion GeBorde

November 5th, 2010

Hey Filip,

Great, detailed treatment of this. I’m working on implementing all of this right now in my customization/simplification for my client projects. I have a question though. In removing the submenus for the Appearance tab in WP 3.0.1, I cannot locate “Widgets” or “Menus” in menu.php, nor find any reference to removing these two specifically anywhere on the web so far. Any tips?

And to be clear, I don’t want to remove the entire Appearance tab. It’s just with some clients, I want them to be able to access Menus, but not Widgets, and also the other way around.

Thanks!

Fareed

November 16th, 2010

very great article,very nice tutorial…this post needs every wordpress bloggers..thank you for shaing

Kieran

November 18th, 2010

Great article!

I only wish that I found it a month ago when I began my customization of wordpress. Its all here and very very well explained.
Thank you very much for the info.

Jeff Payne

November 20th, 2010

Excellent! Thank you.

fred

December 6th, 2010

thx a lot !!!
I was trying to hack on the wordpress files but it is so much easier ….
you saved my day :D

James

December 7th, 2010

Excellent! I am just starting to learn wordpress and this should help put a lot!

Paul

December 17th, 2010

not sure if doing this in the theme is the best solution. I think it’s better to use a plugin.

Tes

December 23rd, 2010

How would you change the “Howdy” in the Admin to “Welcome”

Thanks

Dan Bernardic

January 2nd, 2011

Hi!

Thanks for the great resource.

The code for Removing Menu Items (under Removing Menu Items in the source of this page) has a bug in that it does not address the last item in the list (you start at end, and on the first iteration skip to the second-last item)

Here’s code that solves that bug:

global $menu;
$restricted = array(__(‘Links’), __(‘Comments’), __(‘Useful’), __(‘Content’), __(‘Posts’), ‘Contact’);

foreach ($menu as $key => $menu_item) {
var_dump($key, $menu_item);
$value = explode(‘ ‘,$menu[$key][0]);
if(in_array($value[0] != NULL?$value[0]:”" , $restricted)){
unset($menu[$key]);}
}

Cheers!

DavidM

January 5th, 2011

Wow, among the multitudes of blogs covering the same topic exactly the same way, this post really stands out. You didn’t just cover how to replace the logo, you covered how to install the kitchen sink! ;)

Excellent article!

noviolence

January 7th, 2011

Thanks Filip for this ton of useful Information!

I used to use Adminimize but since 3.0.4 it produces an error message in the backend. So I started to look for a way to simplify the backend for my client and found your post, luckily. I think it’s better to do it without a plugin because you can gain some insight in how the system works.

Like Matt (3.comment) pointed out: it would be very interesting to know how one can apply those changes just to a single Role or User. I would like to keep all the metaboxes for myself as administrator.
It would be great if someone can point out a way on how to do this.

Thanks again for the useful post, I used it in an recent project and also bookmarked it. Keep up the good work

Greetings
Phil

Jim

January 12th, 2011

Thanks for this one! This will save me from getting gray hairs when I show my client how to use WordPress next week… Keep it up! Greeting, Jim

BlogWP

January 14th, 2011

Tks
My wp dashboard becomes clean and clear :D

gezzeg

January 22nd, 2011

Great tutorial! Im looking for this! Thanks!

Paolo

February 3rd, 2011

Thanks for posting this stuffs man!

Just one thing, do you have a list of functions on how to remove the other submenus?

I went here. http://codex.wordpress.org/Administration_Menus
but the links for submenus is nowhere to be found now.

Still you did a great Job.

Much love and respect.

Webbdesigner

February 4th, 2011

load-styles.php?c=0&dir=ltr&load=dashboard,plugin-install,global,wp-admin&ver=17aa35fdf22036c3f75256fc16b16184

this href loads all the styles dynamically in some way. But I can’t load it now cause I have changed the wp-admin folder name (and subsequently changed all of the hrefs in the wordpress core using search and replace with the prog grepWin/notetablight). but this have messed up the admin css – this is the only bug I have found.. How will I make it find the right css:es for the admin section again?

In the mean time I have hard coded the css in the header section not a very pretty solution though..

Jason Fonceca

February 5th, 2011

In – Tense.

A fantastic breakdown of the functions/code necessary to declutter wordpress for clients. Absolutely beautiful work man. Thank you so much.

Adam

February 15th, 2011

Thanks man – very handy stuff.

TheAL

February 15th, 2011

“WordPress is one of the best CMSs out there — if not the best).” Lotta software engineers / programmers out there still won’t even call it a CMS. Developers usually don’t mind calling it that, but they’re more like users than the people forging the computer science guiding these things. It was, to be honest, a blogging platform masquerading as a CMS. With custom post types and 3.0, though, it is more of a CMS than ever. It’s certain one of the best solutions. But until it can do just about anything as an extension of its sheer inherent modularity, like Drupal for example, it’s still hard to call it a full-fledged CMS, let alone the best.

Chris Janus

February 15th, 2011

fantastic!! this is just the information i’ve been looking for, as i use wordpress as a CMS for a lot of my customers’ sites. for the less saavy customers, there definitely are a lot of unnecessary fields/sections that just add confusion for them. this will really help me minimize the clutter and make it easier for them – thanks so much for the article!

Lubna

February 18th, 2011

Thanks a million for the loads of time you spared me on this one.
Is there any way, I could do different customizations, according to the role of the logged in user?

Matt

March 2nd, 2011

Can you explain how you got rid of the Background and Header from the “Appearance” panel? I looked in the wp-admin/menu.php and couldn’t find it in the code.

Tiffany

March 4th, 2011

YEAAEEHHH!!!

Sending you a virtual cheer!

Thanks so much for the information; it is tremendously helpful!

Ed

March 19th, 2011

This is for the post by Tez asking about removing the term Howdy in the admin. I actually wrote a post on a couple days ago: http://www.redbridgenet.com/wordpress/how-to-replace-or-remove-wordpress-howdy/

In the comments I was also able to show a quick and dirty method of changing the link of the administrator display title.

daniel

March 29th, 2011

great one, works fine for english, but when i change to italian they al appear back. Any solution?

Rob

April 4th, 2011

This is great! But what happens when updating when a new version of wordpress comes out? Just curious.

Fahd Murtaza

April 14th, 2011

Great article, just one little typo fix needed.

Instead of

add_action(‘widgets_init’,remove_some_wp_widgets’, 1);

it should be

add_action(‘widgets_init’,'remove_some_wp_widgets’, 1);

Just a quote before remove_some_wp_widgets needs to be added.

Great article once again, really helpful.

Fahd Murtaza

April 14th, 2011

@Rob: if you are using this code in your theme’s functions.php, there is nothing to worry about, wordpress update only updates core wordpress files, not your theme files. Yes if you are using the wordpress twenty ten theme, you should be able to do a child theme with its own functions.php file that has the original code + the code you want to use from above. Hope that helps!

bigdrobek

April 16th, 2011

Great post, I have used tis for removing widget from dashboard WordPress 3.1.1. I have just small problem with witget from broken links checker. I used thist to run it:
add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’, 20);
And I removed widget from post writing “Quick Page/Post Redirect”, all other widget are out(turn off) in new version os WP3.1.1 auromatically.

Phil_Zombie

May 11th, 2011

Great tutorial!!

apentium

May 14th, 2011

Good post – you can make non-blog-like real websites wit wp. I also like plugins that help with seo.

Chris

May 17th, 2011

Thank you for this very useful guide especially on the hard-coding part – inserting the logo in the wp-admin page.

This is great for branding too.

Your site is definitely one of my favorites to gain more knowledge on WordPress

Best wishes and thanks again.
Chris

Chris

May 17th, 2011

And how do I change the hard-coding later?

Just by removing the code and the images?

Cheers!

Joakim

May 25th, 2011

Thanks! This was a great article.

Ashok Basnet

May 25th, 2011

Great article. Was wondering how to modify the admin menus…

Michael

June 8th, 2011

Hi Filip

That is a great guide! I use some customizing already, in order to remove a few columns from the post columns view and add a custom field to it. Do you have any idea what I need to do to make the post search field that is located above the post columns make search in that custom field, too?

Thanks

Mike

Bill

July 1st, 2011

Great post. This really helps us tailor the compete application to continue the identity of the site into the admin section and tie it all together as one.

Phil Harvey

July 2nd, 2011

Fantastic Guide, thank you much!! I am using WordPress as the platform for simple business profile websites for my own clients and this will make it much easier for them. One thing I am also hoping to incorporate is some alteration of user roles and views, if you can answer any of these I would love ya. First can I create and or edit the name of the roles. Second, I want a Master Admin (me) who can see all wordpress options and settings. And finally I want my client to be able to see and add users but not be able to see my master admin. Thanks for any info.

Sean

July 10th, 2011

How about renaming the menu titles in the admin area? For example: Post -> Article, Plugins -> Extension, etc…

Abigail

August 24th, 2011

Wow! This is so helpful! Very detailed tutorial. Big thanks!

Bruno

August 28th, 2011

Hi there Filip,

how can I target a menu item that is composed with two words and a blank space between them?

ie: __(‘Custom Types’),

any idea?
Thx :)

PANKAJ ANUPAM

August 29th, 2011

Great tips, interesting to know… thanks!

ASAK

September 19th, 2011

Yeah, i am trying all of the given tricks. They really rock.

Jeff Carter

September 24th, 2011

This is exactly what I’m looking for! Everybody talks about the various plugins that do the same thing. Problem with plugins is that if you’re turning over a site to a client, they still have access to the plugin that hides the menus and can unhide. Clients are less likely to think about poking around in source code, but give ‘em something to click on — like another plugin — and they surely will. I think this is the best solution.

OK, speaking of plugins… what if a plugin or theme add a menu item? How do you find the name of that menu item? I am trying to hide a particular theme config menu item added by the theme installation. Problem is, what I think is the menu name seems to only be what is displayed as the menu item heading, not the actual name. Any idea how I can find the actual menu name (or variable of the actual name)?

bespoke wd

September 25th, 2011

great post
i dont know if its lready been said but
you’ve missed a comma in your code example in removing widgets…remove_some_wp_widgets.

zafar

September 27th, 2011

this is one of the best tutorial for customization perspective….

Sussex WD

September 27th, 2011

Filip, thanks for this post! I’ve been looking at ways we can streamline the dashboard and sidebar areas of the WordPress admin screen for our clients. The first thing that they always ask us about the Dashboard is “what are all the boxes for?”. Streamlining these and replacing them with interesting content that we could add in ourselves would be ideal.

Thanks for the headstart with this! Will let you know if we come up with anything creative that we can share with you and your readers too!

Matt

idf

October 5th, 2011

Nice for Share guys.thanks ..

Sven

October 7th, 2011

Hi, does this also work with a multi site installation for these admin pages?
If I add these line to the ‘using’ theme folder?

Greg Turner

October 17th, 2011

On the backend, I would like to be able to add a column to the page that displays a list of all of my ‘video’ custom post types. Specifically, I want to display the id of each post of that type. Anyone have any hints how to do this? Thanks

Jeremy Edmiston

October 18th, 2011

@Greg – I used this in my Custom Post Type for Clients… should be enough to point you in the right direction.

// Create Custom Post Types
add_action(‘init’, ‘client_init’);
function client_init() {
$labels = array(
‘name’ =&gt; ‘Clients’,
‘singular_name’ =&gt; ‘Client’,
‘add_new’ =&gt; ‘Add New’,
‘add_new_item’ =&gt; ‘Add New Client’,
‘edit_item’ =&gt; ‘Edit Client’,
‘new_item’ =&gt; ‘New Client’,
‘all_items’ =&gt; ‘All Clients’,
‘view_item’ =&gt; ‘View Client’,
‘search_items’ =&gt; ‘Search Clients’,
‘not_found’ =&gt; ‘No clients found’,
‘not_found_in_trash’ =&gt; ‘No clients found in Trash’,
‘parent_item_colon’ =&gt; ”,
‘menu_name’ =&gt; ‘Clients’
);

$args = array(
‘labels’ =&gt; $labels,
‘public’ =&gt; true,
‘publicly_queryable’ =&gt; true,
‘show_ui’ =&gt; true,
‘show_in_menu’ =&gt; true,
‘query_var’ =&gt; true,
‘capability_type’ =&gt; ‘post’,
‘has_archive’ =&gt; true,
‘hierarchical’ =&gt; true,
‘menu_position’ =&gt; 20,
‘menu_icon’ =&gt; CS_ROOT_URL .’/images/client_icon_16.png’, // 16px16
‘with_front’=&gt;false,
‘rewrite’ =&gt; array(‘slug’ =&gt; ‘client’), // Permalinks format
‘supports’ =&gt; array(‘title’,'editor’,'excerpt’,'thumbnail’,'revisions’,'page-attributes’,'hero’)
);

register_post_type(‘client’,$args);
}

// Custom Columns
add_filter("manage_edit-client_columns", "client_edit_columns");
add_action("manage_client_posts_custom_column", "client_custom_columns",10,2);

function client_edit_columns($columns){
$columns = array(
"cb" =&gt; "",
"title" =&gt; "Client",
"contact" =&gt; "Contact",
"web_url" =&gt; "Website",
"portal_url" =&gt; "Portal",
);

return $columns;
}

function client_custom_columns($column){
global $post;
switch ($column)
{
case "contact":
$custom = get_post_custom();
echo $custom["contact"][0]. ‘ ‘ . $custom["contact_email"][0] . ‘ ‘ . $custom["contact_phone"][0];
break;
case "web_url":
$custom = get_post_custom();
echo ‘<a>’.$custom["web_url"][0].’</a>’;
break;
case "portal_url":
$custom = get_post_custom();
echo ‘<a>’.$custom["portal_url"][0].’</a>’;
break;
}
}

widi dwi

October 22nd, 2011

really after a day i got stuck with the code, i found this tutorial. nice tutorial .. GBU

Amereservant

October 26th, 2011

Hey Filip,
Thank you very much for sharing this! It has saved me many hours digging for hooks to do this.

I wanted to make one suggestion for a revision to your instructions…
Under your section “Removing Menu Items”, I recommend using ‘remove_menu_page()’ and ‘remove_submenu_page()’ instead since they’re available since 3.1.

The reason being is I couldn’t remove a custom menu item, which I discovered it was because your “while( prev($menu) )” actually starts the filtering one step away from the end and then your explode() doesn’t work with menu names that have a space in them.
I’m guessing the explode was to compensate for the ‘Comments 0′ part, but non-standard menu items will fail, which makes sense why the two new functions use slugs and work great.

I figured I’d pass that along… Thanks!

Zuri

November 2nd, 2011

Fantastic article Filip – thanks! You seem pretty knowledgable, so I’m wondering if you can help me out with one other thing. I’m currently customizing roles prior to handing over a site to a client. The client would like to allow certain users the ability to edit their own pages/posts, but only for review. I’ve managed to create a role that will only allow a user to edit their own pages and posts. They can also add a new page or post and submit it for review. However, once the page/past is published they can update it without having to submit it for review. I’d like them to have to submit it for review regardless of whether it has been published or not. Any ideas? Non-plugin ideas preferably.

Mona Makwana

November 8th, 2011

This is great article. Thanks for sharing..!@!

rakesh

November 12th, 2011

hey

whats code for hiding default template from page attributes?

regards

Jay

November 18th, 2011

Really cool post, I agree WP is the best CMS and this allows me to make sure the confusing things included in a standard WP install are not there to confuse my clients after I complete their site.

I do prefer a plugin that does it all though.

Manuel

November 29th, 2011

Great, very well explained, your work is much appreciated

marvin

December 12th, 2011

This a great post with all information about WordPress customization.

Buddhika

October 9th, 2012

Grate Post.:)

Tahir

September 16th, 2013

Thanks for this awesome article.

I fully customized my dashboard with this help.

Thanks again.

Leave a Comment

Subscribe to the comments on this article.