Twenty Twelve | How to unlink Open Sans font

Twenty Twelve loads "Open Sans" font style as special font.
in case you don't need this you can unlink this by following way which written in Twenty Twelve functions.php.

Twenty Twelve - Open sans

/wp-content/themes/twentytwelve/functions.php

	/*
	 * Loads our special font CSS file.
	 *
	 * The use of Open Sans by default is localized. For languages that use
	 * characters not supported by the font, the font can be disabled.
	 *
	 * To disable in a child theme, use wp_dequeue_style()
	 * function mytheme_dequeue_fonts() {
	 *     wp_dequeue_style( 'twentytwelve-fonts' );
	 * }
	 * add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_fonts', 11 );
	 */

Just copy this into functions.php in child theme like this.

/wp-content/themes/[child theme]/functions.php

// To disable in a child theme, use wp_dequeue_style()
function mytheme_dequeue_fonts() {
    wp_dequeue_style( 'twentytwelve-fonts' );
}
add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_fonts', 11 );

this will let your wp site not link "Open Sans" font at id="twentytwelve-fonts-css"

  • このエントリーをはてなブックマークに追加

関連記事

(日本語) Google Code Prettifyを使用してソースコードを表示をしてくれる「Prettify Code Syntax」

Sorry, this entry is only available in 日本語.

no image

(日本語) アップグレードで「更新を展開しています... 」のままになった場合の対処のひとつ

Sorry, this entry is only available in 日本語.

(日本語) 翻訳ファイルの子テーマ化

Sorry, this entry is only available in 日本語.

(日本語) Twenty Thirteen カスタマイズ

Sorry, this entry is only available in 日本語.

(日本語) 管理画面のCSSをカスタマイズ

Sorry, this entry is only available in 日本語.

(日本語) 「Google Analytics for WordPress」投稿URLにやたら長いパラメータがついてしまう

Sorry, this entry is only available in 日本語.

(日本語) Twenty Ten カスタマイズ

Sorry, this entry is only available in 日本語.

(日本語) ポップアップが実装できるプラグイン「Anything popup」「Easy Modal」

Easy Modal[/caption] Easy Modal[/caption] Easy Modal[/caption][caption id="attachment_8281" align="

(日本語) プラグイン関連のJSやCSSの読み込みをフィルター

Sorry, this entry is only available in 日本語.

Twenty Twelve | How to Remove "Leave a reply" under the post title

Twenty Twelve in 1.1 Introducing the way to remove "Leave a reply" which will take you to comment a

Message

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

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

PAGE TOP ↑