简体   繁体   English

为什么图像不会显示在WordPress网站的版权部分?

[英]Why won't images show up in copyright section of WordPress website?

I'm trying to add a Creative Commons image to the footer of my websites and the image simply won't display. 我正在尝试将知识共享图像添加到我的网站的页脚中,并且该图像根本不会显示。

One of the websites ( https://thegalleryof.me/ ) was created using Divi and when adding the code to the copyright section, the image appears in the preview, but after publishing and going to the site, it's not there. 其中一个网站( https://thegalleryof.me/ )是使用Divi创建的,将代码添加到版权部分时,图片会显示在预览中,但是在发布并转到该网站后,该图片不存在。 Even looking at the source code I found that the img tag was gone, only the a tag was present. 即使查看源代码,我也发现img标签不见了,只有a标签存在。

This is the code I've added: 这是我添加的代码:

<a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png"/></a>

I've tried simply adding an image from my own website and that doesn't show up either (not even in the source code after publishing). 我尝试仅从自己的网站添加图像,但也没有显示(甚至在发布后的源代码中也没有显示)。

On another website using a regular theme ( https://blog.ovidiuav.com/ ) the image (or any image) doesn't even show up in the preview. 在另一个使用常规主题的网站( https://blog.ovidiuav.com/ )上,图像(或任何图像)甚至都不会显示在预览中。

I have no idea why this is happening, hoping someone can enlighten me. 我不知道为什么会这样,希望有人能启发我。

Thank you! 谢谢!

WizardCoder commented above with the answer : WizardCoder 在上面评论了答案

Divi strips out images from the footer credits textarea. Divi从页脚积分文本区域中删除图像。 You would either have to add a widget in that area, or create a child theme and hard code it in to the HTML. 您要么必须在该区域中添加一个小部件,要么创建一个子主题并将其硬编码到HTML中。 If the image doesn't exist in the html markup there isn't much you can do with CSS, other than creating a pseudo element and adding the image as a background. 如果该图像不存在于html标记中,那么除了创建伪元素并将图像添加为背景之外,您无法使用CSS进行其他操作。

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

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