Post Pic

How to change WordPress editor font

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!

7 Responses

Jul 15 2011 15:20

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

Jul 21 2011 20:50

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.

Thanks

Oct 26 2011 02:59

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?

Cheers,
Vic :)

May 24 2012 00:47

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

Jun 16 2012 16:47

This did not work for me in latest WP version.

Aug 16 2012 19:32

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.

May 21 2013 09:45

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?

Trackbacks:

Leave a Comment

* Name, Email, Comment are Required

WP Theme of the week

Sponsored Likebox