//自定义顶部1920*120图片
$h2h_cus_args = array(
'flex-width' => true,
'width' => 1920,
'flex-height' => true,
'flex-width' => false,
'height' => 120,
'default-image' => get_template_directory_uri() .'/images/header.jpg',// 设置默认顶部图像为空, 也可以用 /images/header.jpg 代替!
'random-default' => false, //是否默认随机
);
add_theme_support( 'custom-header', $h2h_cus_args );
在开发揭阳分销商城过程中,想着顶部自定义个头部图片,放广告图或者公告,通过修改主题function.php添加以上代码实现。