How To Change WordPress Admin Dashboard Font

How to change WordPress admin dashboard font? Maybe it happened to you that you like to change your WordPress admin dashboard font. In this post, we’re going to teach it to you.

For doing this you need to add PHP code to your theme or plugin. But if you don’t know the PHP code, don’t worry, you can do this with the plugin.

For the start, we’re gonna do this with the PHP code then we’re teaching about the plugin.

Table of Contents

PHP Code

Remember: Please make a backup from your website before changes

Open your theme or plugin in an editor like VScode then start your changes more comfortable.

Go to your theme’s files and open the functions.php file. Do not forget the functions file is a necessary file so make a backup before changes.

Add this code at the end of the file

function custom_admin_css(){
    echo '
        <style>
          body,h1,h2,h3,h4,h5,h6,span,p,button,input,textarea,div{
              font-family: yourfont;
          }
        </style>
    ';
}
add_action('admin_head','custom_admin_css');

Read more about CSS fonts.