Change a Admin Color Scheme for All Users in WordPress

If you want to change user color scheme for all users on your site and change user experience. You can change default admin color scheme without any plugin. You need need to add small code snippet into your theme’s functions.php file. You can find this file in your theme folder.

Open functions.php file and put following code in that 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');

There are many wordpress admin related methods and code snippet written in my site. simply use search functionality for more code snippets or check wordpress tutorials section.

 

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.