- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
「カスタム背景」の版間の差分
提供: WordPress Codex 日本語版
(en:Custom Backgrounds 2012-05-15T15:27:48 Bono 版を翻訳用にコピー) |
細 (改名提案) |
||
43行目: | 43行目: | ||
{{原文|Custom Backgrounds|117910}}<!-- 2012-05-15T15:27:48 Bono 版 --> | {{原文|Custom Backgrounds|117910}}<!-- 2012-05-15T15:27:48 Bono 版 --> | ||
+ | [[Category:改名提案]] | ||
[[Category:上級トピック]] | [[Category:上級トピック]] | ||
[[Category:デザインとレイアウト]] | [[Category:デザインとレイアウト]] |
2015年5月1日 (金) 22:38時点における版
このページ「カスタム背景」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています。
Custom Backgrounds is a theme feature that provides for customization of the background color and image.
See also Appearance Background Screen.
Adding Theme Support
Since Version 3.4, themes need to use add_theme_support() in the functions.php file to supports custom backgrounds, like so:
add_theme_support( 'custom-background' );
Note that you can add default arguments using:
$defaults = array( 'default-color' => '', 'default-image' => '', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '' ); add_theme_support( 'custom-background', $defaults );
Example
An example using default '#000000' background color with 'background.jpg' background image:
$args = array( 'default-color' => '000000', 'default-image' => get_template_directory_uri() . '/images/background.jpg', ); add_theme_support( 'custom-background', $args );
Related
テーマサポート:
add_theme_support(),
remove_theme_support(),
current_theme_supports()
テーマ機能:
サイドバー,
ナビゲーションメニュー,
投稿フォーマット,
投稿サムネイル,
カスタム背景,
カスタムヘッダー,
自動フィードリンク,
html5,
コンテンツ幅,
editor-style