Theme Functions, Wordpress

Tips to Remove Admin Color options Scheme in WordPress

2 43

Today I have come up with an very easy snippet. In WordPress you would have noticed in your profile page, there is an option to change the WordPress Dashboard Color Scheme. I bet very rarely people will use this option. So I thought to remove this option to make the profile page very simple to users.

You can remove this Color Scheme option by two ways:

Adding Code to Functions.php

Go to your theme functions.php file. And add the following code in the functions.php to remove the Admin color scheme options.

PHP Snippet

function admin_color_scheme() {

   global $_wp_admin_css_colors;

   $_wp_admin_css_colors = 0;

}

add_action('admin_head', 'admin_color_scheme');

Alternative

Another Alternative way to remove the admin color scheme options panel is by inserting the following code into the functions.php

PHP Snippet
if(is_admin()){

  remove_action("admin_color_scheme_picker", "admin_color_scheme_picker");

}

I hope that you liked this simple snippet. I will keep posting some more tricky code hacks for WordPress soon.

About the author / 

admin

Related Posts

Popular

Editor’s Pick

  • Maximizing Performance with useLayoutEffect React Hook

    Discover how to optimize your React apps with our comprehensive guide on ‘Maximizing Performance with useLayoutEffect React Hook’. Learn how to leverage this powerful hook for efficient DOM manipulation, eliminating visual glitches, and creating smoother transitions. Ideal for both novice and expert React developers.

  • Having Custom CSS in Pagination hack

    Page Navigation hack for Blogger replaces the default older posts and Newer Posts with Numbered page link just like WordPress. If you want to implement this hack in your blogger Blog then please visit this posts. You can add this hack in two methods , 1. By Editing Blogger template 2. Adding As a Widget…

  • The Battle Between CSS-in-JS and Traditional CSS: Pros, Cons, and Best Practices

    If you’re a web developer, chances are you’ve heard of both CSS-in-JS and traditional CSS. Let’s start with a quick explanation of each: CSS-in-JS: A method of styling web pages where CSS styles are written in JavaScript files and applied to components at runtime. Traditional CSS: The standard way of styling web pages using a…

  • Blogger Search Form box code

    Recently I explained How to add Blogger search box code to your Blogger template. Now In this post I will explain How to customize the search box code to suit your Blogger template. In order to make it easier for you , I am going to explain this with two blogger search form example codes….

  • Show only post titles in Labels page

    Hope you might have noticed that few blogger users are using custom layout for Home Page , Post Pages, Labels Page and Archives Page. Though I will write about having custom Layout in your blog later , In this post I will explain how to show only post titles in labels page and Archives page….