Difference between revisions of "WordPress Classic Editor Font"

Wiki.TerraBase.info
Jump to navigation Jump to search
m
m
 
Line 6: Line 6:
}
}
</syntaxhighlight>
</syntaxhighlight>
* Then add the following code to the theme's (parent or child) functions.php file;
*Then add the following code to the theme's (parent or child) functions.php file;
<syntaxhighlight lang="text">
function alternate_font()
    {
    add_editor_style( 'tinymce_font.css' );
    }
 
add_action( 'after_setup_theme', 'alternate_font' );
</syntaxhighlight>Source from: https://premium.wpmudev.org/forums/topic/make-my-default-fonts-as-arial-from-georgia-in-the-text-editor/

Latest revision as of 15:48, 6 January 2021

If you want a font for the WordPress Classic Editor (TinyMCE) that isn't the Georgia Font (strikingly similar to the Microsoft Times New Roman font), then do the following;

  • Create a file in the ./themes/ directory, name it anything.css (suggestion: tinymce_font.css) with the following code;
    body#tinymce.wp-editor {
    font-family: Arial, Helvetica, sans-serif !important;
    }
  • Then add the following code to the theme's (parent or child) functions.php file;
function alternate_font()
     {
     add_editor_style( 'tinymce_font.css' );
     }

add_action( 'after_setup_theme', 'alternate_font' );

Source from: https://premium.wpmudev.org/forums/topic/make-my-default-fonts-as-arial-from-georgia-in-the-text-editor/