Theme Functions, Wordpress

Tips to Remove Admin Color options Scheme in WordPress

2 38

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

  • React Performance Optimization: Strategies and Techniques for Efficient Data Fetching and Management

    When developing modern web applications, efficient data fetching and management are crucial for providing a seamless user experience. As the amount of data in web applications grows, optimizing data fetching and management becomes increasingly important. Overview of the importance of data fetching and management in modern web applications Data fetching refers to retrieving data from…

  • How to install Applications using Terminal in Ubuntu?

    Whenever we install a new operating system we would at first be puzzled at the strangeness of the new desktop environment. We don’t know what to do and what not to do. But when it comes to linux things get easy than a user can imagine and the problem that pops up can be rectified…

  • Webpack vs Vite: Choosing the Right Build Tool for Your Next Web Project

    In web development, build tools are essential for frontend developers to efficiently organize, compile and optimize their codebase. These tools automate the process of transforming source code into a production-ready format, which saves time and makes it easier to maintain projects in the long run. Two of the most popular build tools for modern web…

  • 10 Ways ChatGPT Can Boost Your Enterprise: From Customer Service to Personalized Learning

    In today’s fast-paced business world, companies are constantly looking for innovative ways to improve efficiency, productivity, and customer satisfaction. One of the most promising tools for achieving these goals is ChatGPT, a powerful language model that can be integrated into a wide range of enterprise applications. From customer service to marketing, HR, and beyond, ChatGPT…

  • 20+ Amazing Time-lapse Photography Inspirations

    Today i have come up with an interesting photography technique named “Time-lapse Photography”. It’s somewhat related to Long Exposure Photography, but here all the individual shots are combined together to form a slow motion video. In Time-lapse Photography, the same subject will be captured which will spread out over a period of time. Each frame…