【发布时间】:2018-11-25 18:22:42
【问题描述】:
我在我的 functions.php 文件中添加了一个名为 add_theme_support('custom-header'); 的函数
转到外观 -> 自定义标题并上传我的文件后,它拒绝显示在我的网站上。如果我检查我的 Wordpress 管理面板,图像在 UI 上清晰可见,但不会显示在我的网站上,有什么原因吗?
Header.php 代码:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Wordpress Theme</title>
<?php wp_head();?>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet">
</head>
<?php wp_nav_menu(); ?>
<body <?php body_class();?>
<img alt="" src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>">
【问题讨论】: