【问题标题】:Wordpress header image not displayingWordpress 标题图片不显示
【发布时间】: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; ?>">

【问题讨论】:

    标签: php wordpress


    【解决方案1】:

    您是否检查过您的 css,在标题图像的类或 id 上没有“显示:无/隐藏”?

    您可以通过检查元素来仔细检查。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-05-11
      • 2016-10-09
      • 2017-07-01
      • 2019-12-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多