简体   繁体   English

Wordpress中的标题图片未加载

[英]header image in wordpress not loading

Hi I am new to Wordpress. 嗨,我是Wordpress的新手。 I have to change a wordpress theme. 我必须更改一个WordPress主题。 When I change the header image, by simply going to Appearence -> header menu, it uploads the image but the image is not getting displayed on the website? 当我更改标题图像时,只需转到“外观”->“标题”菜单,它就会上传图像,但是该图像没有显示在网站上? Please can anyone help me. 请任何人能帮助我。 I am very new in this. 我对此很陌生。

The Blog title is being called from your header.php. Blog标题是从您的header.php中调用的。 You would want to add the image before your blog title tag. 您可能想在博客标题标签之前添加图像。

Something like 就像是

<img src="wp-content/uploads/header.jpg" /><h1 id="blog-title">

You can wrap it in a div and style or position it with css as well. 您可以将其包装在div中,也可以使用CSS设置样式或位置。

Example

<div id="header-img">
  <img src="wp-content/uploads/header.jpg" />
</div>

CSS 的CSS

#header-img {
   padding: 5px;
}

Obviously this is a basic example of how to approach this. 显然,这是如何解决此问题的基本示例。 If your blog title was not being called from header.php you would need to find where it coming from and make your changes from there. 如果未从header.php调用您的博客标题,则需要找到它的来源并从此处进行更改。 A good Lesson from this should be to locate and learn where wordpress is calling whatever you would like to edit. 从中获得的一个很好的教训应该是找到并了解wordpress在哪里调用您想要编辑的内容。 Things that appear on every page at the top are usually located in the header. 出现在顶部每一页的内容通常位于标题中。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM