Theme Functions, Wordpress

Tips to Remove Admin Color options Scheme in WordPress

2 44

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

  • Javascript Classes: The Definitive Guide for 2023

    Explore ‘JavaScript Classes: The Definitive Guide for 2023’ to master the ins and outs of JavaScript Classes. From basics to advanced concepts, this guide empowers developers to write cleaner, more efficient code. Perfect for beginners and seasoned pros looking to level up their JavaScript game.

  • 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…

  • How to Remove Author Name From Blogger Posts

    If you are running multiple blogs and for some reason you don’t want to show your name in author field, Then this Blogger hack is for you. Though the topic looks very simple , but most don’t know how do this. So in this tutorial , I will explain how to remove the author name…

  • Show only post titles in Home page

    As you might have noticed in many magazine themes , showing only post titles in home page is getting popular these days. By showing only post titles in Home page you can decrease the page loading time and also it will easy for the reader to navigate. Showing post titles in home page will certainly…

  • 50+ Amazing Olympics Infographics Inspirations

    The London Olympics 2012 has proved to be a phenomenal attraction this year – attracting eyeballs and attentions like nothing else. Well, I caught on to the Olympics buzz quite late into the second week – watched it every day from 11 in the night (IST). However, I followed it regularly over the news papers…