先日、WordPress を最新版の Version 3.3 にアップグレードしたのですが、投稿画面のフォントが変わってしまった・・・というよりも以前変更していたのに、その変更が無効になってしまっている!どうして?
意外に簡単に修正できましたので自分用の備忘録として記録しておきます。参考にしたのは、「[M] mbdb::WordPress 3.3の投稿画面のフォントを変更する10行のコード」という投稿記事。これまでは以下のコードを挿入していました。
<?php
// 投稿記事のエディター用のフォントを変更するプラグイン
// 参考サイト:http://www.catswhocode.com/blog/8-new-and-amazing-wordpress-hacks
add_action( 'admin_head-post.php', 'cwc_fix_html_editor_font' );
add_action( 'admin_head-post-new.php', 'cwc_fix_html_editor_font' );
function cwc_fix_html_editor_font() { ?>
<style type="text/css">#editorcontainer #content, #wp_mce_fullscreen { font-family:メイリオ,Meiryo,"ヒラギノ角ゴ Pro W3","Hiragino Kaku Gothic Pro","MSPゴシック","MS P Gothic",Osaka,Verdana,Arial,Helvetica,sans-serif; }</style>
<?php }
?>
上記のコードの「#editorcontainer #content, #wp_mce_fullscreen」の部分を以下のように変更します。
<?php
// 投稿記事のエディター用のフォントを変更するプラグイン
// 参考サイト:http://www.catswhocode.com/blog/8-new-and-amazing-wordpress-hacks
add_action( 'admin_head-post.php', 'cwc_fix_html_editor_font' );
add_action( 'admin_head-post-new.php', 'cwc_fix_html_editor_font' );
function cwc_fix_html_editor_font() { ?>
<style type="text/css">#wp-content-editor-container textarea { font-family:メイリオ,Meiryo,"ヒラギノ角ゴ Pro W3","Hiragino Kaku Gothic Pro","MSPゴシック","MS P Gothic",Osaka,Verdana,Arial,Helvetica,sans-serif; }</style>
<?php }
?>
簡単に修正できました!




WordPress 3.3 の投稿画面のフォントを変更する! – http://www.target-a.net/2011…