How To Change The Font In WordPress HTML Editor

Here’s a quick and short tutorial shared by Damien Oh from WPBDailyBits that shows you how you can change the font in WordPress’ HTML editor.

ScreenHunter 46 Aug. 16 10.52 How To Change The Font In WordPress HTML Editor

Follow the very brief instructions below to find out how.

  • Open your theme’s functions.php file.
  • Copy/paste the following code below:
add_action( 'admin_head-post.php', 'wpdb_fix_html_editor_font' );
add_action( 'admin_head-post-new.php', 'wpdb_fix_html_editor_font' );
function wpdb_fix_html_editor_font() { ?>
 <style type="text/css">
 #editorcontainer #content, #wp_mce_fullscreen, .wp-editor-area {
 font-family: Verdana,Arial,sans-serif!important;
 }
 </style>
<?php }
  • Save the PHP file and you’re done!

You can also change the above code to try out other fonts.

Incoming search terms for the article:

Related Posts

Redirecting Users To Bypass WordPress Dashboard

Twitter Feed Reader Using PHP

How to Create a Clean and Elegant Blog Layout

Adding Expires Headers In Ruby On Rails