Skip to content

How To Set Default Admin Color Scheme In WordPress

WordPress released its 3.8 Parker last month and it came up with a brand new flat UI and responsive design and looks great on all devices. It gives us an option to choose from 8 different admin color schemes. In this tutorial, we will show you how to set a default admin color scheme for new users when they register.

However, it doesn’t change the admin color scheme for old users. Plus, this code will not stop users from changing their admin color scheme.

Just add following snippet to your current theme’s functions.php file:

function set_default_admin_color($user_id) {
	$args = array(
		'ID' => $user_id,
		'admin_color' => 'sunrise'
	);
	wp_update_user( $args );
}
add_action('user_register', 'set_default_admin_color');

 

Leave a Reply

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