DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

If you’re using WordPress visual editor, you may want to change the default font to a new one of your choice. Simply follow this simple recipe to get the job done.

Nothing complicated. Simply open your functions.php file and paste the following code:

add_action( 'admin_head-post.php', 'devpress_fix_html_editor_font' );
add_action( 'admin_head-post-new.php', 'devpress_fix_html_editor_font' );

function devpress_fix_html_editor_font() { ?>
<style type="text/css">#editorcontainer #content, #wp_mce_fullscreen { font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; }</style>
<?php }

Once you saved the file, the editor font is changed to Georgia. Of course, feel free to modify the code to display your favorite font.

Thanks to DevPress for the cool tip!



  1. Thanks Jean for very handy recipe. Can here embed any font? How is it possible?

  2. It will be a handy thing to know when you don’t want to give your client the standard WordPress so you change the small things like fonts in the editor.


  3. Hi guys,
    thanks for the tip. Just changed the default font to Verdana. Classic I know but is easy readable 🙂

    Question: Do you think is possible to help us with a chunk of code to make possible uploading files directly from comments?

    Vic 🙂

  4. I tried this but it didn’t work. Has this changed in WordPress 3?

  5. This did not work for me in latest WP version.

  6. How to change the default font of the WordPress that usually appears default body of the article? I want to change my Alltut theme font like a theisis framwork font. Please help me.

  7. This code doesn’t work. I see I’m not the only one having trouble with it. Does anyone have any idea how to implement a different fount/size in the editor?

Leave a Comment

Your email address will not be published. Required fields are marked *