Tuesday, December 1, 2020
Home Blogging How to Set Default Admin Color Scheme for New Users in WordPress

How to Set Default Admin Color Scheme for New Users in WordPress

One of the crucial talked about characteristic of WordPress 3.8 is the brand new admin interface. It’s absolutely responsive and appears nice on all gadgets. For those who don’t just like the default colours, then you’ll be able to select from Eight totally different admin color schemes and even add new ones. On this article, we are going to present you set a default admin color scheme in WordPress for brand spanking new customers. We may also present you stop customers from altering the default WordPress admin color scheme.

So as to set a default WordPress admin coloration scheme for brand spanking new customers, all that you must do is add the next code in your theme’s capabilities.php file or in a site-specific plugin:

1
2
3
4
5
6
7
8
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');

This code modifications the default WordPress admin coloration scheme to Dawn for every new consumer who registers in your web site. It doesn’t change the colour scheme for beforehand registered customers. Additionally, this code won’t cease customers from selecting one other admin coloration scheme. Customers can nonetheless go to their profile part and select another coloration scheme they like.

The way to Cease Customers From Switching Admin Colour Schemes

If you want to set a default color scheme on your web site and don’t want customers to make use of another color scheme, then all it’s important to do is add the next code in your theme’s capabilities.php file or in a site-specific plugin:

1
2
if ( !current_user_can('manage_options') )
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );

 

This code will take away the admin color scheme picker from the profile display of all customers besides customers with administrator privileges.

You May Also Like : How to Find and Remove Unused Shortcodes From WordPress Posts

We hope this text helped you set a default WordPress admin color scheme and disable the coloration scheme picker from consumer profiles in your WordPress web site.

For those who might change the default admin coloration scheme, which color scheme would you choose? Tell us by leaving a remark beneath.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

How to make money with Toluna surveys

Toluna is most well-known for its surveys, however there are an entire host of different methods to earn rewards on the location. Our assessment...

6 Best Free Alternatives To Camtasia 2020 For Mac And Windows

I really like Camtasia and have been an avid person of Camtasia ever since 2012. Recently, the Camtasia workforce launched the 2019 model of Camtasia which...

List of Travel Affiliate Programs For Travel Bloggers

For me, touring is freedom. If you're a journey blogger, I offer you a standing ovation. Being a digital nomad, I perceive how powerful it's to weblog whereas touring. I additionally...

Social Warfare Review: Explode your Social Shares

Everybody is aware of that having social media sharing buttons is important for each weblog within the Blogosphere. Why? Well, social media sharing buttons assist us...

Recent Comments