How to change WordPress editor font

February 1, 2011 at 12:03 pm

Don’t like the good old Courrier font used in WordPress editor in HTML mode? It’s very easy to use a more modern font such as Monaco or Consolas. Just read the following recipe to know how to do!

Paste the following code into your theme functions.php file:

function change_editor_font(){
        echo "<style type='text/css'>
#editorcontainer textarea#content {
  font-family: Monaco, Consolas, \"Andale Mono\", \"Dejavu Sans Mono\", monospace; 
} add_action("admin_print_styles", "change_editor_font");

Save the file, then look at the editor :) It simple as that.

Thanks to Metin Saylan for the cool tip!