1. 主页
  2. 文档
  3. WordPress函数
  4. add_theme_support
  5. Custom Background

Custom Background

3.4 版本引进的功能,让主题支持定义背景。

add_theme_support('custom-background');

设置默认背景的参数:

$defaults=array('default-color'=>'','default-image'=>'','wp-head-callback'=>'_custom_background_cb','admin-head-callback'=>'','admin-preview-callback'=>'');
add_theme_support('custom-background',$defaults);
这篇文章对您有用吗?

我们要如何帮助您?