Troy Chaplin

Design & Development

Posted in the Blog

Customize the WordPress Administration Area to Suit a Clients Needs

In my opinion, WordPress is the best option for building a custom CMS for clients, as it provides one of the best administration area setups that I’ve ever worked with. Things are laid out in a simple way, and the user interface is intuitive and easy to navigate. But yet there are always certain clients that will aimlessly click around into any possible area and will sometimes change, alter or remove important items that are critical to how the front facing website functions.

There are a few good functions out there to help in hiding some of those areas, but I recently came across an incredible post at Six Revisions that has allowed me to further customize what individuals can and can’t do in the administration area, so be sure to check out the full post, as it provides some great resources.

Removing Post and Page Modules

I’m currently working on a new project that involves lots of automation, and there are quite a number of modules on both the post and page editing areas that are not required. Instead of going into the screen options each time a new user account is created, I’m using the following function to hidden certain modules on all accounts in the system.

The following piece of code includes all the modules that can be hidden from each editor, nicely commented so you can customize your function to suit your specific needs.


function customize_meta_boxes() {

	/* Removes meta boxes from Posts */
	remove_meta_box('categorydiv','post','normal'); // remove categories module
	remove_meta_box('tagsdiv-post_tag','post','normal'); // remove tags module
	remove_meta_box('postexcerpt','post','normal'); // remove excerpt module
	remove_meta_box('trackbacksdiv','post','normal'); // remove trackbacks module
	remove_meta_box('postcustom','post','normal'); // remove custom fields module
	remove_meta_box('commentstatusdiv','post','normal'); // remove discussions module
	remove_meta_box('commentsdiv','post','normal'); // remove comments module
	remove_meta_box('authordiv','post','normal'); // remove author module
	remove_meta_box('revisionsdiv','post','normal'); // remove revisions module

	/* Removes meta boxes from pages */
	remove_meta_box('postcustom','page','normal'); // remove custom fields module
	remove_meta_box('trackbacksdiv','page','normal'); // remove trackbacks module
	remove_meta_box('commentstatusdiv','page','normal'); // remove discussion module
	remove_meta_box('commentsdiv','page','normal'); // remove comments module
	remove_meta_box('authordiv','page','normal'); // remove author module
}

add_action('admin_init','customize_meta_boxes');

Again, a big thanks to Six Revisions for this incredible post. The information provided there will be a big help in created a much easier administration experience for clients, which was already pretty great to begin with!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>